|
@@ -20,9 +20,9 @@ fn_script_log_info "Updating LinuxGSM"
|
|
|
fn_print_dots "Selecting repo"
|
|
fn_print_dots "Selecting repo"
|
|
|
fn_script_log_info "Selecting repo"
|
|
fn_script_log_info "Selecting repo"
|
|
|
# Select remotereponame
|
|
# Select remotereponame
|
|
|
-curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null
|
|
|
|
|
|
|
+curl --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null
|
|
|
if [ $? != "0" ]; then
|
|
if [ $? != "0" ]; then
|
|
|
- curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null
|
|
|
if [ $? != "0" ]; then
|
|
if [ $? != "0" ]; then
|
|
|
fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories"
|
|
fn_print_fail_nl "Selecting repo: Unable to to access GitHub or Bitbucket repositories"
|
|
|
fn_script_log_fail "Selecting repo: Unable to to access GitHub or Bitbucket repositories"
|
|
fn_script_log_fail "Selecting repo: Unable to to access GitHub or Bitbucket repositories"
|
|
@@ -39,9 +39,9 @@ fi
|
|
|
# Check linuxsm.sh
|
|
# Check linuxsm.sh
|
|
|
echo -en "checking ${remotereponame} linuxgsm.sh...\c"
|
|
echo -en "checking ${remotereponame} linuxgsm.sh...\c"
|
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
|
- curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh" 1> /dev/null
|
|
|
else
|
|
else
|
|
|
- curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh" 1> /dev/null
|
|
|
fi
|
|
fi
|
|
|
if [ $? != "0" ]; then
|
|
if [ $? != "0" ]; then
|
|
|
fn_print_fail_eol_nl
|
|
fn_print_fail_eol_nl
|
|
@@ -51,9 +51,9 @@ if [ $? != "0" ]; then
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
|
- tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh"))
|
|
|
|
|
|
|
+ tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/linuxgsm.sh"))
|
|
|
else
|
|
else
|
|
|
- tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh"))
|
|
|
|
|
|
|
+ tmp_script_diff=$(diff "${tmpdir}/linuxgsm.sh" <(curl --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/linuxgsm.sh"))
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ "${tmp_script_diff}" != "" ]; then
|
|
if [ "${tmp_script_diff}" != "" ]; then
|
|
@@ -119,9 +119,9 @@ fi
|
|
|
echo -en "checking ${remotereponame} config _default.cfg...\c"
|
|
echo -en "checking ${remotereponame} config _default.cfg...\c"
|
|
|
fn_script_log_info "Checking ${remotereponame} config _default.cfg"
|
|
fn_script_log_info "Checking ${remotereponame} config _default.cfg"
|
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
|
- curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null
|
|
|
else
|
|
else
|
|
|
- curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/config-default/config-lgsm/${gameservername}/_default.cfg" 1> /dev/null
|
|
|
fi
|
|
fi
|
|
|
if [ $? != "0" ]; then
|
|
if [ $? != "0" ]; then
|
|
|
fn_print_fail_eol_nl
|
|
fn_print_fail_eol_nl
|
|
@@ -131,9 +131,9 @@ if [ $? != "0" ]; then
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
|
- 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"))
|
|
|
|
|
|
|
+ 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"))
|
|
|
else
|
|
else
|
|
|
- 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"))
|
|
|
|
|
|
|
+ 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"))
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ "${config_file_diff}" != "" ]; then
|
|
if [ "${config_file_diff}" != "" ]; then
|
|
@@ -153,9 +153,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
|
|
|
echo -en "checking ${remotereponame} config ${distroid}-${distroversioncsv}.csv...\c"
|
|
echo -en "checking ${remotereponame} config ${distroid}-${distroversioncsv}.csv...\c"
|
|
|
fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
|
|
fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
|
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
|
- curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
|
|
|
else
|
|
else
|
|
|
- curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
|
|
|
fi
|
|
fi
|
|
|
if [ $? != "0" ]; then
|
|
if [ $? != "0" ]; then
|
|
|
fn_print_fail_eol_nl
|
|
fn_print_fail_eol_nl
|
|
@@ -165,9 +165,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
|
- 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"))
|
|
|
|
|
|
|
+ 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"))
|
|
|
else
|
|
else
|
|
|
- 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"))
|
|
|
|
|
|
|
+ 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"))
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
if [ "${config_file_diff}" != "" ]; then
|
|
if [ "${config_file_diff}" != "" ]; then
|
|
@@ -191,9 +191,9 @@ if [ -n "${modulesdir}" ]; then
|
|
|
echo -en "checking ${remotereponame} module ${modulefile}...\c"
|
|
echo -en "checking ${remotereponame} module ${modulefile}...\c"
|
|
|
github_file_url_dir="lgsm/modules"
|
|
github_file_url_dir="lgsm/modules"
|
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
|
- curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
|
|
|
else
|
|
else
|
|
|
- curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
|
|
|
|
|
|
|
+ curl --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
|
|
|
fi
|
|
fi
|
|
|
if [ $? != 0 ]; then
|
|
if [ $? != 0 ]; then
|
|
|
fn_print_error_eol_nl
|
|
fn_print_error_eol_nl
|
|
@@ -210,9 +210,9 @@ if [ -n "${modulesdir}" ]; then
|
|
|
else
|
|
else
|
|
|
# compare file
|
|
# compare file
|
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
if [ "${remotereponame}" == "GitHub" ]; then
|
|
|
- module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}"))
|
|
|
|
|
|
|
+ module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}"))
|
|
|
else
|
|
else
|
|
|
- module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}"))
|
|
|
|
|
|
|
+ module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}"))
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# results
|
|
# results
|