@@ -20,9 +20,9 @@ fn_script_log_info "Updating LinuxGSM"
2020fn_print_dots " Selecting repo"
2121fn_script_log_info " Selecting repo"
2222# Select remotereponame
23- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null
23+ curl --connect-timeout 3 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null
2424if [ $? != " 0" ]; then
25- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null
25+ curl --connect-timeout 3 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null
2626 if [ $? != " 0" ]; then
2727 fn_print_fail_nl " Selecting repo: Unable to to access GitHub or Bitbucket repositories"
2828 fn_script_log_fail " Selecting repo: Unable to to access GitHub or Bitbucket repositories"
3939# Check linuxsm.sh
4040echo -en " checking ${remotereponame} linuxgsm.sh...\c"
4141if [ " ${remotereponame} " == " GitHub" ]; then
42- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null
42+ curl --connect-timeout 3 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null
4343else
44- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null
44+ curl --connect-timeout 3 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null
4545fi
4646if [ $? != " 0" ]; then
4747 fn_print_fail_eol_nl
@@ -51,9 +51,9 @@ if [ $? != "0" ]; then
5151fi
5252
5353if [ " ${remotereponame} " == " GitHub" ]; then
54- tmp_script_diff=$( diff " ${tmpdir} /linuxgsm.sh" <( curl --connect-timeout 10 -s " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" ) )
54+ tmp_script_diff=$( diff " ${tmpdir} /linuxgsm.sh" <( curl --connect-timeout 3 -s " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" ) )
5555else
56- tmp_script_diff=$( diff " ${tmpdir} /linuxgsm.sh" <( curl --connect-timeout 10 -s " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" ) )
56+ tmp_script_diff=$( diff " ${tmpdir} /linuxgsm.sh" <( curl --connect-timeout 3 -s " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" ) )
5757fi
5858
5959if [ " ${tmp_script_diff} " != " " ]; then
119119echo -en " checking ${remotereponame} config _default.cfg...\c"
120120fn_script_log_info " Checking ${remotereponame} config _default.cfg"
121121if [ " ${remotereponame} " == " GitHub" ]; then
122- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" 1> /dev/null
122+ curl --connect-timeout 3 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" 1> /dev/null
123123else
124- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" 1> /dev/null
124+ curl --connect-timeout 3 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" 1> /dev/null
125125fi
126126if [ $? != " 0" ]; then
127127 fn_print_fail_eol_nl
@@ -131,9 +131,9 @@ if [ $? != "0" ]; then
131131fi
132132
133133if [ " ${remotereponame} " == " GitHub" ]; then
134- config_file_diff=$( diff " ${configdirdefault} /config-lgsm/${gameservername} /_default.cfg" <( curl --connect-timeout 10 -s " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" ) )
134+ config_file_diff=$( diff " ${configdirdefault} /config-lgsm/${gameservername} /_default.cfg" <( curl --connect-timeout 3 -s " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" ) )
135135else
136- config_file_diff=$( diff " ${configdirdefault} /config-lgsm/${gameservername} /_default.cfg" <( curl --connect-timeout 10 -s " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" ) )
136+ config_file_diff=$( diff " ${configdirdefault} /config-lgsm/${gameservername} /_default.cfg" <( curl --connect-timeout 3 -s " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" ) )
137137fi
138138
139139if [ " ${config_file_diff} " != " " ]; then
@@ -153,9 +153,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
153153 echo -en " checking ${remotereponame} config ${distroid} -${distroversioncsv} .csv...\c"
154154 fn_script_log_info " Checking ${remotereponame} ${distroid} -${distroversioncsv} .csv"
155155 if [ " ${remotereponame} " == " GitHub" ]; then
156- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" 1> /dev/null
156+ curl --connect-timeout 3 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" 1> /dev/null
157157 else
158- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" 1> /dev/null
158+ curl --connect-timeout 3 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" 1> /dev/null
159159 fi
160160 if [ $? != " 0" ]; then
161161 fn_print_fail_eol_nl
@@ -165,9 +165,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
165165 fi
166166
167167 if [ " ${remotereponame} " == " GitHub" ]; then
168- config_file_diff=$( diff " ${datadir} /${distroid} -${distroversioncsv} .csv" <( curl --connect-timeout 10 -s " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" ) )
168+ config_file_diff=$( diff " ${datadir} /${distroid} -${distroversioncsv} .csv" <( curl --connect-timeout 3 -s " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" ) )
169169 else
170- config_file_diff=$( diff " ${datadir} /${distroid} -${distroversioncsv} .csv" <( curl --connect-timeout 10 -s " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" ) )
170+ config_file_diff=$( diff " ${datadir} /${distroid} -${distroversioncsv} .csv" <( curl --connect-timeout 3 -s " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" ) )
171171 fi
172172
173173 if [ " ${config_file_diff} " != " " ]; then
@@ -191,9 +191,9 @@ if [ -n "${modulesdir}" ]; then
191191 echo -en " checking ${remotereponame} module ${modulefile} ...\c"
192192 github_file_url_dir=" lgsm/modules"
193193 if [ " ${remotereponame} " == " GitHub" ]; then
194- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /${github_file_url_dir} /${modulefile} " 1> /dev/null
194+ curl --connect-timeout 3 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /${github_file_url_dir} /${modulefile} " 1> /dev/null
195195 else
196- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /${github_file_url_dir} /${modulefile} " 1> /dev/null
196+ curl --connect-timeout 3 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /${github_file_url_dir} /${modulefile} " 1> /dev/null
197197 fi
198198 if [ $? != 0 ]; then
199199 fn_print_error_eol_nl
@@ -210,9 +210,9 @@ if [ -n "${modulesdir}" ]; then
210210 else
211211 # compare file
212212 if [ " ${remotereponame} " == " GitHub" ]; then
213- module_file_diff=$( diff " ${modulesdir} /${modulefile} " <( curl --connect-timeout 10 -s " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /${github_file_url_dir} /${modulefile} " ) )
213+ module_file_diff=$( diff " ${modulesdir} /${modulefile} " <( curl --connect-timeout 3 -s " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /${github_file_url_dir} /${modulefile} " ) )
214214 else
215- module_file_diff=$( diff " ${modulesdir} /${modulefile} " <( curl --connect-timeout 10 -s " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /${github_file_url_dir} /${modulefile} " ) )
215+ module_file_diff=$( diff " ${modulesdir} /${modulefile} " <( curl --connect-timeout 3 -s " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /${github_file_url_dir} /${modulefile} " ) )
216216 fi
217217
218218 # results
0 commit comments