@@ -16,31 +16,17 @@ info_distro.sh
16
16
fn_print_dots " "
17
17
fn_script_log_info " Updating LinuxGSM"
18
18
19
+ fn_repo_selector
19
20
fn_print_dots " Selecting repo"
20
- fn_script_log_info " Selecting repo"
21
- # Select remotereponame
22
- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null
23
- if [ $? != " 0" ]; then
24
- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null
25
- if [ $? != " 0" ]; then
26
- fn_print_fail_nl " Selecting repo: Unable to to access GitHub or Bitbucket repositories"
27
- fn_script_log_fatal " Selecting repo: Unable to to access GitHub or Bitbucket repositories"
28
- core_exit.sh
29
- else
30
- remotereponame=" Bitbucket"
31
- fn_print_ok_nl " Selecting repo: ${remotereponame} "
32
- fi
33
- else
34
- remotereponame=" GitHub"
35
- fn_print_ok_nl " Selecting repo: ${remotereponame} "
36
- fi
21
+ fn_print_ok_nl " Selecting repo: ${remotereponame} "
22
+ fn_script_log_pass " Selecting repo: ${remotereponame} "
37
23
38
24
# Check linuxsm.sh
39
25
echo -en " checking ${remotereponame} linuxgsm.sh...\c"
40
26
if [ " ${remotereponame} " == " GitHub" ]; then
41
- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null
27
+ curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /linuxgsm.sh" 1> /dev/null
42
28
else
43
- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null
29
+ curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /linuxgsm.sh" 1> /dev/null
44
30
fi
45
31
if [ $? != " 0" ]; then
46
32
fn_print_fail_eol_nl
118
104
echo -en " checking ${remotereponame} config _default.cfg...\c"
119
105
fn_script_log_info " Checking ${remotereponame} config _default.cfg"
120
106
if [ " ${remotereponame} " == " GitHub" ]; then
121
- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" 1> /dev/null
107
+ curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" 1> /dev/null
122
108
else
123
- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" 1> /dev/null
109
+ curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/config-default/config-lgsm/${gameservername} /_default.cfg" 1> /dev/null
124
110
fi
125
111
if [ $? != " 0" ]; then
126
112
fn_print_fail_eol_nl
@@ -152,9 +138,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
152
138
echo -en " checking ${remotereponame} config ${distroid} -${distroversioncsv} .csv...\c"
153
139
fn_script_log_info " Checking ${remotereponame} ${distroid} -${distroversioncsv} .csv"
154
140
if [ " ${remotereponame} " == " GitHub" ]; then
155
- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" 1> /dev/null
141
+ curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" 1> /dev/null
156
142
else
157
- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" 1> /dev/null
143
+ curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /lgsm/data/${distroid} -${distroversioncsv} .csv" 1> /dev/null
158
144
fi
159
145
if [ $? != " 0" ]; then
160
146
fn_print_fail_eol_nl
@@ -190,9 +176,9 @@ if [ -n "${modulesdir}" ]; then
190
176
echo -en " checking ${remotereponame} module ${modulefile} ...\c"
191
177
github_file_url_dir=" lgsm/modules"
192
178
if [ " ${remotereponame} " == " GitHub" ]; then
193
- curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /${github_file_url_dir} /${modulefile} " 1> /dev/null
179
+ curl --connect-timeout 10 -IsfL " https://raw.githubusercontent.com/${githubuser} /${githubrepo} /${githubbranch} /${github_file_url_dir} /${modulefile} " 1> /dev/null
194
180
else
195
- curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /${github_file_url_dir} /${modulefile} " 1> /dev/null
181
+ curl --connect-timeout 10 -IsfL " https://bitbucket.org/${githubuser} /${githubrepo} /raw/${githubbranch} /${github_file_url_dir} /${modulefile} " 1> /dev/null
196
182
fi
197
183
if [ $? != 0 ]; then
198
184
fn_print_error_eol_nl
0 commit comments