Skip to content

Commit 940f420

Browse files
committed
remove code no longer needed in ul
1 parent 1e14ff5 commit 940f420

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

lgsm/modules/command_update_linuxgsm.sh

+11-25
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,17 @@ info_distro.sh
1616
fn_print_dots ""
1717
fn_script_log_info "Updating LinuxGSM"
1818

19+
fn_repo_selector
1920
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}"
3723

3824
# Check linuxsm.sh
3925
echo -en "checking ${remotereponame} linuxgsm.sh...\c"
4026
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
4228
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
4430
fi
4531
if [ $? != "0" ]; then
4632
fn_print_fail_eol_nl
@@ -118,9 +104,9 @@ fi
118104
echo -en "checking ${remotereponame} config _default.cfg...\c"
119105
fn_script_log_info "Checking ${remotereponame} config _default.cfg"
120106
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
122108
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
124110
fi
125111
if [ $? != "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

Comments
 (0)