@@ -20,9 +20,9 @@ fn_script_log_info "Updating LinuxGSM"
20
20
fn_print_dots " Selecting repo"
21
21
fn_script_log_info " Selecting repo"
22
22
# 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
24
24
if [ $? != " 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
26
26
if [ $? != " 0" ]; then
27
27
fn_print_fail_nl " Selecting repo: Unable to to access GitHub or Bitbucket repositories"
28
28
fn_script_log_fail " Selecting repo: Unable to to access GitHub or Bitbucket repositories"
39
39
# Check linuxsm.sh
40
40
echo -en " checking ${remotereponame} linuxgsm.sh...\c"
41
41
if [ " ${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
43
43
else
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
45
45
fi
46
46
if [ $? != " 0" ]; then
47
47
fn_print_fail_eol_nl
@@ -51,9 +51,9 @@ if [ $? != "0" ]; then
51
51
fi
52
52
53
53
if [ " ${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" ) )
55
55
else
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" ) )
57
57
fi
58
58
59
59
if [ " ${tmp_script_diff} " != " " ]; then
119
119
echo -en " checking ${remotereponame} config _default.cfg...\c"
120
120
fn_script_log_info " Checking ${remotereponame} config _default.cfg"
121
121
if [ " ${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
123
123
else
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
125
125
fi
126
126
if [ $? != " 0" ]; then
127
127
fn_print_fail_eol_nl
@@ -131,9 +131,9 @@ if [ $? != "0" ]; then
131
131
fi
132
132
133
133
if [ " ${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" ) )
135
135
else
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" ) )
137
137
fi
138
138
139
139
if [ " ${config_file_diff} " != " " ]; then
@@ -153,9 +153,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
153
153
echo -en " checking ${remotereponame} config ${distroid} -${distroversioncsv} .csv...\c"
154
154
fn_script_log_info " Checking ${remotereponame} ${distroid} -${distroversioncsv} .csv"
155
155
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
157
157
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
159
159
fi
160
160
if [ $? != " 0" ]; then
161
161
fn_print_fail_eol_nl
@@ -165,9 +165,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
165
165
fi
166
166
167
167
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" ) )
169
169
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" ) )
171
171
fi
172
172
173
173
if [ " ${config_file_diff} " != " " ]; then
@@ -191,9 +191,9 @@ if [ -n "${modulesdir}" ]; then
191
191
echo -en " checking ${remotereponame} module ${modulefile} ...\c"
192
192
github_file_url_dir=" lgsm/modules"
193
193
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
195
195
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
197
197
fi
198
198
if [ $? != 0 ]; then
199
199
fn_print_error_eol_nl
@@ -210,9 +210,9 @@ if [ -n "${modulesdir}" ]; then
210
210
else
211
211
# compare file
212
212
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} " ) )
214
214
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} " ) )
216
216
fi
217
217
218
218
# results
0 commit comments