Browse Source

correct var name

pull/4166/head
Daniel Gibbs 4 years ago
parent
commit
0056e1c83b
  1. 10
      lgsm/modules/command_update_linuxgsm.sh
  2. 16
      lgsm/modules/core_dl.sh
  3. 14
      linuxgsm.sh
  4. 14
      tests/tests_fctrserver.sh
  5. 14
      tests/tests_jc2server.sh
  6. 14
      tests/tests_mcserver.sh
  7. 14
      tests/tests_ts3server.sh

10
lgsm/modules/command_update_linuxgsm.sh

@ -187,11 +187,11 @@ if [ -n "${modulesdir}" ]; then
# check if module exists in the repo and remove if missing.
# commonly used if module names change.
echo -en "checking ${remotereponame} module ${modulefile}...\c"
github_file_url_dir="lgsm/modules"
github_fileurl_dir="lgsm/modules"
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 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${modulefile}" 1>/dev/null
else
curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1>/dev/null
curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${modulefile}" 1>/dev/null
fi
if [ $? != 0 ]; then
fn_print_error_eol_nl
@ -208,9 +208,9 @@ if [ -n "${modulesdir}" ]; then
else
# compare file
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 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${modulefile}"))
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 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${modulefile}"))
fi
# results

16
lgsm/modules/core_dl.sh

@ -432,8 +432,8 @@ fn_fetch_file(){
# github_fileurl_dir: the directory of the file in the GitHub: lgsm/modules
# github_fileurl_name: the filename of the file to download from GitHub: core_messages.sh
# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules
# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh
# github_fileurl_dir: the directory of the file in the GitHub: lgsm/modules
# github_fileurl_name: the filename of the file to download from GitHub: core_messages.sh
# githuburl: the full GitHub url
# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2
@ -513,8 +513,8 @@ fn_fetch_config(){
# Fetches modules from the Git repo during first download.
fn_fetch_module(){
github_file_url_dir="lgsm/modules"
github_file_url_name="${modulefile}"
github_fileurl_dir="lgsm/modules"
github_fileurl_name="${modulefile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
@ -526,7 +526,7 @@ fn_fetch_module(){
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${modulesdir}"
local_filename="${github_file_url_name}"
local_filename="${github_fileurl_name}"
chmodx="chmodx"
run="run"
forcedl="noforce"
@ -537,8 +537,8 @@ fn_fetch_module(){
# Fetches modules from the Git repo during update-lgsm.
fn_update_module(){
github_file_url_dir="lgsm/modules"
github_file_url_name="${modulefile}"
github_fileurl_dir="lgsm/modules"
github_fileurl_name="${modulefile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
@ -550,7 +550,7 @@ fn_update_module(){
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${modulesdir}"
local_filename="${github_file_url_name}"
local_filename="${github_fileurl_name}"
chmodx="chmodx"
run="norun"
forcedl="noforce"

14
linuxgsm.sh

@ -158,20 +158,20 @@ fn_bootstrap_fetch_file(){
}
fn_bootstrap_fetch_file_github(){
github_file_url_dir="${1}"
github_file_url_name="${2}"
github_fileurl_dir="${1}"
github_fileurl_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${3}"
local_filename="${github_file_url_name}"
local_filename="${github_fileurl_name}"
chmodx="${4:-0}"
run="${5:-0}"
forcedl="${6:-0}"

14
tests/tests_fctrserver.sh

@ -165,20 +165,20 @@ fn_bootstrap_fetch_file(){
}
fn_bootstrap_fetch_file_github(){
github_file_url_dir="${1}"
github_file_url_name="${2}"
github_fileurl_dir="${1}"
github_fileurl_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${3}"
local_filename="${github_file_url_name}"
local_filename="${github_fileurl_name}"
chmodx="${4:-0}"
run="${5:-0}"
forcedl="${6:-0}"

14
tests/tests_jc2server.sh

@ -166,20 +166,20 @@ fn_bootstrap_fetch_file(){
}
fn_bootstrap_fetch_file_github(){
github_file_url_dir="${1}"
github_file_url_name="${2}"
github_fileurl_dir="${1}"
github_fileurl_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${3}"
local_filename="${github_file_url_name}"
local_filename="${github_fileurl_name}"
chmodx="${4:-0}"
run="${5:-0}"
forcedl="${6:-0}"

14
tests/tests_mcserver.sh

@ -166,20 +166,20 @@ fn_bootstrap_fetch_file(){
}
fn_bootstrap_fetch_file_github(){
github_file_url_dir="${1}"
github_file_url_name="${2}"
github_fileurl_dir="${1}"
github_fileurl_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${3}"
local_filename="${github_file_url_name}"
local_filename="${github_fileurl_name}"
chmodx="${4:-0}"
run="${5:-0}"
forcedl="${6:-0}"

14
tests/tests_ts3server.sh

@ -166,20 +166,20 @@ fn_bootstrap_fetch_file(){
}
fn_bootstrap_fetch_file_github(){
github_file_url_dir="${1}"
github_file_url_name="${2}"
github_fileurl_dir="${1}"
github_fileurl_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
if [ "${githubbranch}" == "master" ]&&[ "${githubuser}" == "GameServerManager" ]&&[ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
else
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${3}"
local_filename="${github_file_url_name}"
local_filename="${github_fileurl_name}"
chmodx="${4:-0}"
run="${5:-0}"
forcedl="${6:-0}"

Loading…
Cancel
Save