This commit is contained in:
Heavybullets8 2022-06-13 14:59:37 -06:00
parent 8c1db858b8
commit 8ac7b496d9

View File

@ -4,7 +4,7 @@
[[ -z "$*" || "-" == "$*" || "--" == "$*" ]] && echo "This script requires an argument, use --help for help" && exit [[ -z "$*" || "-" == "$*" || "--" == "$*" ]] && echo "This script requires an argument, use --help for help" && exit
ARGS="$@" ; echo "$ARGS" | sed -e 's/\s?\-\-self\-update\s?//' ARGS="$@" ; echo "$ARGS" | sed -e 's/[:space:]\?\-\-self\-update[:space:]\?//'
SCRIPT=$(readlink -f "$0") SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT") SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTNAME="$0" SCRIPTNAME="$0"
@ -21,7 +21,7 @@ git fetch
git checkout $BRANCH git checkout $BRANCH
git pull --force git pull --force
echo "Running the new version..." echo "Running the new version..."
exec bash "$SCRIPTNAME" "${ARGS[@]}" exec bash "$SCRIPTNAME" ${ARGS[@]}
# Now exit this old instance # Now exit this old instance
exit 1 exit 1