Don't use realpath if path is already absolute

This commit is contained in:
Ben Peddell 2021-03-14 06:38:04 +10:00
parent d6bbe867ea
commit 566161d5a4

View File

@ -43,7 +43,10 @@ arkstGithubRepo="${arkstGithubRepoOverride:-arkmanager/ark-server-tools}"
arkstGlobalCfgFile="${arkstGlobalCfgFileOverride:-/etc/arkmanager/arkmanager.cfg}"
arkstUserCfgFile="${arkstUserCfgFileOverride:-.arkmanager.cfg}"
arkstScriptPath="$(realpath "$0")"
arkstScriptPath="${0}"
if [[ "${arkstScriptPath}" != /* ]]; then
arkstScriptPath="$(realpath "$0")"
fi
doUpgradeTools() {
if [ -n "$arkstUsePkgManager" ]; then