@@ -16,31 +16,17 @@ info_distro.sh
1616fn_print_dots " "
1717fn_script_log_info " Updating LinuxGSM"
1818
19+ fn_repo_selector
1920fn_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} "
3723
3824# Check linuxsm.sh
3925echo -en " checking ${remotereponame} linuxgsm.sh...\c"
4026if [ " ${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
4228else
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
4430fi
4531if [ $? != " 0" ]; then
4632 fn_print_fail_eol_nl
118104echo -en " checking ${remotereponame} config _default.cfg...\c"
119105fn_script_log_info " Checking ${remotereponame} config _default.cfg"
120106if [ " ${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
122108else
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
124110fi
125111if [ $? != " 0" ]; then
126112 fn_print_fail_eol_nl
@@ -152,9 +138,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
152138 echo -en " checking ${remotereponame} config ${distroid} -${distroversioncsv} .csv...\c"
153139 fn_script_log_info " Checking ${remotereponame} ${distroid} -${distroversioncsv} .csv"
154140 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
156142 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
158144 fi
159145 if [ $? != " 0" ]; then
160146 fn_print_fail_eol_nl
@@ -190,9 +176,9 @@ if [ -n "${modulesdir}" ]; then
190176 echo -en " checking ${remotereponame} module ${modulefile} ...\c"
191177 github_file_url_dir=" lgsm/modules"
192178 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
194180 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
196182 fi
197183 if [ $? != 0 ]; then
198184 fn_print_error_eol_nl
0 commit comments