diff --git a/functions/self_update.sh b/functions/self_update.sh index 20461d04..cd56e705 100644 --- a/functions/self_update.sh +++ b/functions/self_update.sh @@ -3,10 +3,6 @@ args=("$@") self_update() { -script=$(readlink -f "$0") -script_path=$(dirname "$script") -script_name="heavy_script.sh" -cd "$script_path" || exit git fetch &> /dev/null # TODO: change beta to main once testing is complete if git diff --name-only origin/beta | grep -qs ".sh" ; then diff --git a/heavy_script.sh b/heavy_script.sh index 18a08b36..4b99e646 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -3,8 +3,10 @@ # cd to script, this ensures the script can find the source scripts below, even when ran from a seperate directory script=$(readlink -f "$0") script_path=$(dirname "$script") +script_name="heavy_script.sh" cd "$script_path" || exit + # shellcheck source=functions/backup.sh source functions/backup.sh # shellcheck source=functions/dns.sh