Skip to content

Commit

Permalink
feat(update): allow linuxgsm to use steamcmd from apt (#2697)
Browse files Browse the repository at this point in the history
* standardise command if

* feat: debian based distros will now use the steamcmd package
  • Loading branch information
dgibbs64 committed Mar 6, 2020
2 parents 4a0c59d + e139906 commit 6874f93
Show file tree
Hide file tree
Showing 16 changed files with 92 additions and 62 deletions.
38 changes: 19 additions & 19 deletions lgsm/functions/check_deps.sh
Expand Up @@ -160,18 +160,18 @@ fn_deps_detector(){
depstatus=1
jquniversemissing=1
elif [ "${deptocheck}" == "mono-complete" ]; then
if [ -n "$(command -v mono 2>/dev/null)" ]&&[ "$(mono --version 2>&1 | grep -Po '(?<=version )\d')" -ge 5 ]; then
if [ "$(command -v mono 2>/dev/null)" ]&&[ "$(mono --version 2>&1 | grep -Po '(?<=version )\d')" -ge 5 ]; then
# Mono >= 5.0.0 already installed.
depstatus=0
else
# Mono not installed or installed Mono < 5.0.0.
depstatus=1
monostatus=1
fi
elif [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
elif [ "$(command -v dpkg-query 2>/dev/null)" ]; then
dpkg-query -W -f='${Status}' "${deptocheck}" 2>/dev/null | grep -q -P '^install ok installed'
depstatus=$?
elif [ -n "$(command -v rpm 2>/dev/null)" ]; then
elif [ "$(command -v rpm 2>/dev/null)" ]; then
rpm -q "${deptocheck}" > /dev/null 2>&1
depstatus=$?
fi
Expand Down Expand Up @@ -212,15 +212,15 @@ fn_deps_email(){
array_deps_required+=( exim4 )
elif [ -d /etc/sendmail ]; then
array_deps_required+=( sendmail )
elif [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
elif [ "$(command -v dpkg-query 2>/dev/null)" ]; then
array_deps_required+=( mailutils postfix )
elif [ -n "$(command -v rpm 2>/dev/null)" ]; then
elif [ "$(command -v rpm 2>/dev/null)" ]; then
array_deps_required+=( mailx postfix )
fi
else
if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
if [ "$(command -v dpkg-query 2>/dev/null)" ]; then
array_deps_required+=( mailutils postfix )
elif [ -n "$(command -v rpm 2>/dev/null)" ]; then
elif [ "$(command -v rpm 2>/dev/null)" ]; then
array_deps_required+=( mailx postfix )
fi
fi
Expand Down Expand Up @@ -255,13 +255,13 @@ fn_found_missing_deps(){
echo -en "...\r"
sleep 1
echo -en " \r"
if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
if [ "$(command -v dpkg-query 2>/dev/null)" ]; then
cmd="sudo dpkg --add-architecture i386; sudo apt update; sudo apt -y install ${array_deps_missing[@]}"
eval "${cmd}"
elif [ -n "$(command -v dnf 2>/dev/null)" ]; then
elif [ "$(command -v dnf 2>/dev/null)" ]; then
cmd="sudo dnf -y install ${array_deps_missing[@]}"
eval "${cmd}"
elif [ -n "$(command -v yum 2>/dev/null)" ]; then
elif [ "$(command -v yum 2>/dev/null)" ]; then
cmd="sudo yum -y install ${array_deps_missing[@]}"
eval "${cmd}"
fi
Expand All @@ -271,11 +271,11 @@ fn_found_missing_deps(){
echo -e ""
fn_print_warning_nl "Manually install dependencies."
fn_script_log_warn "Manually install dependencies."
if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
if [ "$(command -v dpkg-query 2>/dev/null)" ]; then
echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}"
elif [ -n "$(command -v dnf 2>/dev/null)" ]; then
elif [ "$(command -v dnf 2>/dev/null)" ]; then
echo -e " sudo dnf install ${array_deps_missing[@]}"
elif [ -n "$(command -v yum 2>/dev/null)" ]; then
elif [ "$(command -v yum 2>/dev/null)" ]; then
echo -e " sudo yum install ${array_deps_missing[@]}"
fi
if [ "${steamcmdfail}" ]; then
Expand All @@ -292,11 +292,11 @@ fn_found_missing_deps(){
echo -e ""
fn_print_warning_nl "$(whoami) does not have sudo access. Manually install dependencies."
fn_script_log_warn "$(whoami) does not have sudo access. Manually install dependencies."
if [ -n "$(command -v dpkg-query 2>/dev/null)" ]; then
if [ "$(command -v dpkg-query 2>/dev/null)" ]; then
echo -e " sudo dpkg --add-architecture i386; sudo apt update; sudo apt install ${array_deps_missing[@]}"
elif [ -n "$(command -v dnf 2>/dev/null)" ]; then
elif [ "$(command -v dnf 2>/dev/null)" ]; then
echo -e " sudo dnf install ${array_deps_missing[@]}"
elif [ -n "$(command -v yum 2>/dev/null)" ]; then
elif [ "$(command -v yum 2>/dev/null)" ]; then
echo -e " sudo yum install ${array_deps_missing[@]}"
fi
if [ "${steamcmdfail}" ]; then
Expand Down Expand Up @@ -335,9 +335,9 @@ fn_deps_build_debian(){
array_deps_missing=()

# LinuxGSM requirements.
array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq )
array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq steamcmd )

if [ -n "$(command -v tmux 2>/dev/null)" ]; then
if [ "$(command -v tmux 2>/dev/null)" ]; then
tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
else
array_deps_required+=( tmux )
Expand Down Expand Up @@ -461,7 +461,7 @@ fn_deps_build_redhat(){
fi

# All servers except ts3 require tmux.
if [ -n "$(command -v tmux 2>/dev/null)" ]; then
if [ "$(command -v tmux 2>/dev/null)" ]; then
# Added for users compiling tmux from source to bypass check.
tmuxcheck=1
else
Expand Down
33 changes: 28 additions & 5 deletions lgsm/functions/check_steamcmd.sh
Expand Up @@ -43,10 +43,10 @@ fn_check_steamcmd_user(){
fi
}

fn_check_steamcmd_sh(){
fn_check_steamcmd(){
# Checks if SteamCMD exists when starting or updating a server.
# Installs if missing.
if [ ! -f "${steamcmddir}/steamcmd.sh" ]; then
# Only install if steamcmd package is missing or steamcmd dir is missing.
if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then
if [ "${function_selfname}" == "command_install.sh" ]; then
fn_install_steamcmd
else
Expand All @@ -55,10 +55,33 @@ fn_check_steamcmd_sh(){
fn_install_steamcmd
fi
elif [ "${function_selfname}" == "command_install.sh" ]; then
fn_print_information "SteamCMD is already installed..."
fn_print_information "SteamCMD is already installed"
fn_print_ok_eol_nl
fi
}

fn_check_steamcmd_clear(){
# Will remove steamcmd dir if steamcmd package is installed.
if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${steamcmddir}" ]; then
rm -rf "${steamcmddir:?}"
exitcode=$?
if [ ${exitcode} -ne 0 ]; then
fn_script_log_fatal "Removing ${steamcmddir}"
else
fn_script_log_pass "Removing ${steamcmddir}"
fi
fi
}

fn_check_steamcmd_exec(){
if [ "$(command -v steamcmd 2>/dev/null)" ]; then
steamcmdcommand="steamcmd"
else
steamcmdcommand="./steamcmd.sh"
fi
}

fn_check_steamcmd
fn_check_steamcmd_clear
fn_check_steamcmd_user
fn_check_steamcmd_sh
fn_check_steamcmd_exec
4 changes: 2 additions & 2 deletions lgsm/functions/command_dev_detect_deps.sh
Expand Up @@ -13,9 +13,9 @@ echo -e "Dependencies Checker"
echo -e "================================="
echo -e "Checking directory: "
echo -e "${serverfiles}"
if [ -n "$(command -v eu-readelf 2>/dev/null)" ]; then
if [ "$(command -v eu-readelf 2>/dev/null)" ]; then
readelf=eu-readelf
elif [ -n "$(command -v readelf 2>/dev/null)" ]; then
elif [ "$(command -v readelf 2>/dev/null)" ]; then
readelf=readelf
else
echo -e "readelf/eu-readelf not installed"
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/command_monitor.sh
Expand Up @@ -211,7 +211,7 @@ fn_monitor_loop(){
do
# Will check if gamedig is installed and bypass if not.
if [ "${querymethod}" == "gamedig" ]; then
if [ -n "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then
if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then
if [ -z "${monitorpass}" ]; then
fn_monitor_query
fi
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/command_stop.sh
Expand Up @@ -126,7 +126,7 @@ fn_stop_graceful_sdtd(){
fn_script_log_info "Graceful: telnet"
if [ "${telnetenabled}" == "false" ]; then
fn_print_info_nl "Graceful: telnet: DISABLED: Enable in ${servercfg}"
elif [ -n "$(command -v expect 2>/dev/null)" ]; then
elif [ "$(command -v expect 2>/dev/null)" ]; then
# Tries to shutdown with both localhost and server IP.
for telnetip in 127.0.0.1 ${ip}; do
fn_print_dots "Graceful: telnet: ${telnetip}:${telnetport}"
Expand Down
10 changes: 6 additions & 4 deletions lgsm/functions/command_validate.sh
Expand Up @@ -15,17 +15,19 @@ fn_validation(){
echo -e "* https://docs.linuxgsm.com/commands/validate"
fn_script_log_info "Validating files: SteamCMD"
sleep 3
cd "${steamcmddir}" || exit
if [ -d "${steamcmddir}" ]; then
cd "${steamcmddir}" || exit
fi
# Detects if unbuffer command is available for 32 bit distributions only.
info_distro.sh
if [ -n "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then
if [ "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then
unbuffer="stdbuf -i0 -o0 -e0"
fi

if [ "${appid}" == "90" ]; then
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_info_print 70 +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" +app_update "${appid}" -beta "${branch}" validate +quit | tee -a "${lgsmlog}"
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_info_print 70 +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" +app_update "${appid}" -beta "${branch}" validate +quit | tee -a "${lgsmlog}"
else
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" validate +quit | tee -a "${lgsmlog}"
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" validate +quit | tee -a "${lgsmlog}"
fi
if [ $? != 0 ]; then
fn_print_fail_nl "Validating files: SteamCMD"
Expand Down
8 changes: 4 additions & 4 deletions lgsm/functions/info_distro.sh
Expand Up @@ -32,7 +32,7 @@ do
distroversion=$(grep VERSION_ID /etc/os-release | sed 's/VERSION_ID=//g' | sed 's/\"//g')
distroid=$(grep ID /etc/os-release | grep -v _ID | grep -v ID_ | sed 's/ID=//g' | sed 's/\"//g')
distrocodename=$(grep VERSION_CODENAME /etc/os-release | sed 's/VERSION_CODENAME=//g' | sed 's/\"//g')
elif [ -n "$(command -v lsb_release 2>/dev/null)" ]&&[ "${distro_info}" == "lsb_release" ]; then
elif [ "$(command -v lsb_release 2>/dev/null)" ]&&[ "${distro_info}" == "lsb_release" ]; then
if [ -z "${distroname}" ];then
distroname=$(lsb_release -sd)
elif [ -z "${distroversion}" ];then
Expand All @@ -42,7 +42,7 @@ do
elif [ -z "${distrocodename}" ];then
distrocodename=$(lsb_release -sc)
fi
elif [ -n "$(command -v hostnamectl 2>/dev/null)" ]&&[ "${distro_info}" == "hostnamectl" ]; then
elif [ "$(command -v hostnamectl 2>/dev/null)" ]&&[ "${distro_info}" == "hostnamectl" ]; then
if [ -z "${distroname}" ];then
distroname=$(hostnamectl | grep "Operating System" | sed 's/Operating System: //g')
fi
Expand Down Expand Up @@ -107,7 +107,7 @@ fi
# Available RAM and swap.

# Newer distros can use numfmt to give more accurate results.
if [ -n "$(command -v numfmt 2>/dev/null)" ]; then
if [ "$(command -v numfmt 2>/dev/null)" ]; then
# Issue #2005 - Kernel 3.14+ contains MemAvailable which should be used. All others will be calculated.

# get the raw KB values of these fields.
Expand Down Expand Up @@ -252,7 +252,7 @@ else
fi

# Steam Master Server - checks if detected by master server.
if [ -n "$(command -v jq 2>/dev/null)" ]; then
if [ "$(command -v jq 2>/dev/null)" ]; then
if [ "${ip}" ]&&[ "${port}" ]; then
if [ "${steammaster}" == "true" ]; then
masterserver=$(curl -m 3 -s 'https://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr='${ip}':'${port}'&format=json' | jq '.response.servers[]|.addr' | wc -l)
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/info_stats.sh
Expand Up @@ -10,7 +10,7 @@ info_distro.sh
if [ ! -f "${datadir}/uuid.txt" ];then
mkdir -p "${datadir}"
touch "${datadir}/uuid.txt"
if [ -n "$(command -v uuidgen 2>/dev/null)" ]; then
if [ "$(command -v uuidgen 2>/dev/null)" ]; then
uuidgen > "${datadir}/uuid.txt"
else
cat /proc/sys/kernel/random/uuid > "${datadir}/uuid.txt"
Expand Down
18 changes: 10 additions & 8 deletions lgsm/functions/install_server_files.sh
Expand Up @@ -9,7 +9,7 @@ local commandaction="Install"
local function_selfname=$(basename "$(readlink -f "${BASH_SOURCE[0]}")")

fn_install_server_files(){
if [ "${shortname}" == "ahl" ]; then
if [ "${shortname}" == "ahl" ]; then
remote_fileurl="http://files.linuxgsm.com/ActionHalfLife/action_halflife-1.0.tar.bz2"; local_filedir="${tmpdir}"; local_filename="action_halflife-1.0.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="31430e670692b2eeaa0d1217db4dcb73"
elif [ "${shortname}" == "bf1942" ]; then
remote_fileurl="http://files.linuxgsm.com/BattleField1942/bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; local_filedir="${tmpdir}"; local_filename="bf1942_lnxded-1.61-hacked-to-1.612.full.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="a86a5d3cd64ca59abcc9bb9f777c2e5d"
Expand Down Expand Up @@ -74,7 +74,9 @@ fn_install_server_files_steamcmd(){
counter="0"
while [ "${counter}" == "0" ]||[ "${exitcode}" != "0" ]; do
counter=$((counter+1))
cd "${steamcmddir}" || exit
if [ -d "${steamcmddir}" ]; then
cd "${steamcmddir}" || exit
fi
if [ "${counter}" -le "10" ]; then
# Attempt 1-4: Standard attempt.
# Attempt 5-6: Validate attempt.
Expand All @@ -98,24 +100,24 @@ fn_install_server_files_steamcmd(){

# Detects if unbuffer command is available for 32 bit distributions only.
info_distro.sh
if [ -n "$(command -v stdbuf 2>/dev/null)" ]&&[ "${arch}" != "x86_64" ]; then
if [ "$(command -v stdbuf 2>/dev/null)" ]&&[ "${arch}" != "x86_64" ]; then
unbuffer="stdbuf -i0 -o0 -e0"
fi

if [ "${counter}" -le "4" ]; then
if [ "${appid}" == "90" ]; then
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" +quit
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" +quit
local exitcode=$?
else
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" +quit
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" +quit
local exitcode=$?
fi
elif [ "${counter}" -ge "5" ]; then
if [ "${engine}" == "goldsource" ]; then
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" validate +quit
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" validate +quit
local exitcode=$?
else
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" validate +quit
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" validate +quit
local exitcode=$?
fi
fi
Expand All @@ -133,7 +135,7 @@ fn_install_server_files_steamcmd(){
counter="0"
while [ "${counter}" -le "4" ]; do
counter=$((counter+1))
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" validate +quit
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" "${branch}" validate +quit
local exitcode=$?
done
fi
Expand Down
2 changes: 1 addition & 1 deletion lgsm/functions/query_gamedig.sh
Expand Up @@ -6,7 +6,7 @@
# https://github.com/sonicsnes/node-gamedig

# Check if gamedig and jq are installed.
if [ -n "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then
if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; then

# will bypass query if server offline.
check_status.sh
Expand Down
17 changes: 10 additions & 7 deletions lgsm/functions/update_steamcmd.sh
Expand Up @@ -13,15 +13,16 @@ fn_update_steamcmd_dl(){

# Detects if unbuffer command is available for 32 bit distributions only.
info_distro.sh
if [ -n "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then
if [ "$(command -v stdbuf)" ]&&[ "${arch}" != "x86_64" ]; then
unbuffer="stdbuf -i0 -o0 -e0"
fi

cd "${steamcmddir}" || exit
if [ -d "${steamcmddir}" ]; then
cd "${steamcmddir}" || exit
fi
if [ "${appid}" == "90" ]; then
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" +quit | tee -a "${lgsmlog}"
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" -beta "${branch}" +quit | tee -a "${lgsmlog}"
else
${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" +quit | tee -a "${lgsmlog}"
${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" +quit | tee -a "${lgsmlog}"
fi
fix.sh
}
Expand Down Expand Up @@ -50,8 +51,10 @@ fn_update_steamcmd_localbuild(){

fn_update_steamcmd_remotebuild(){
# Gets remote build info.
cd "${steamcmddir}" || exit
remotebuild=$(./steamcmd.sh +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]')
if [ -d "${steamcmddir}" ]; then
cd "${steamcmddir}" || exit
fi
remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branchname}/d" | grep -m 1 buildid | tr -cd '[:digit:]')
if [ "${installer}" != "1" ]; then
fn_print_dots "Checking for update: ${remotelocation}: checking remote build"
# Checks if remotebuild variable has been set.
Expand Down
4 changes: 2 additions & 2 deletions linuxgsm.sh
Expand Up @@ -72,7 +72,7 @@ fn_bootstrap_fetch_file(){
fi

# If curl exists download file.
if [ -n "$(command -v curl 2>/dev/null)" ]; then
if [ "$(command -v curl 2>/dev/null)" ]; then
# Trap to remove part downloaded files.
echo -en " fetching ${local_filename}...\c"
curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1)
Expand Down Expand Up @@ -192,7 +192,7 @@ fn_install_menu() {
options=$4
# Get menu command.
for menucmd in whiptail dialog bash; do
if [ -x "$(command -v "${menucmd}")" ]; then
if [ "$(command -v "${menucmd}")" ]; then
menucmd=$(command -v "${menucmd}")
break
fi
Expand Down
4 changes: 2 additions & 2 deletions tests/tests_fctrserver.sh
Expand Up @@ -81,7 +81,7 @@ fn_bootstrap_fetch_file(){
fi

# If curl exists download file.
if [ -n "$(command -v curl 2>/dev/null)" ]; then
if [ "$(command -v curl 2>/dev/null)" ]; then
# Trap to remove part downloaded files.
echo -en " fetching ${local_filename}...\c"
curlcmd=$(curl -s --fail -L -o "${local_filedir}/${local_filename}" "${remote_fileurl}" 2>&1)
Expand Down Expand Up @@ -201,7 +201,7 @@ fn_install_menu() {
options=$4
# Get menu command.
for menucmd in whiptail dialog bash; do
if [ -x "$(command -v "${menucmd}")" ]; then
if [ "$(command -v "${menucmd}")" ]; then
menucmd=$(command -v "${menucmd}")
break
fi
Expand Down

0 comments on commit 6874f93

Please sign in to comment.