From b99cb44b7ab420e32ba7d6ee2bf05233231b4796 Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Mon, 13 Jun 2022 15:40:09 -0600 Subject: [PATCH] lowercase --- heavy_script.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/heavy_script.sh b/heavy_script.sh index ef62901a..dcff7967 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -5,17 +5,13 @@ -ARGS=("$@") - - +args=("$@") +self_update() { SCRIPT=$(readlink -f "$0") SCRIPTPATH=$(dirname "$SCRIPT") SCRIPTNAME="$0" BRANCH="beta" - -self_update() { - cd $SCRIPTPATH git fetch @@ -26,12 +22,12 @@ git fetch git pull --force echo "Running the new version..." count=0 - for i in ${ARGS[@]} + for i in "${args[@]}" do - [[ "$i" == "--self-update" ]] && unset "ARGS[$count]" && break + [[ "$i" == "--self-update" ]] && unset "args[$count]" && break ((count++)) done - exec bash "$SCRIPTNAME" "${ARGS[@]}" + exec bash "$SCRIPTNAME" "${args[@]}" # Now exit this old instance exit 1