test
This commit is contained in:
parent
4c8cc6bb2c
commit
2ad456b905
@ -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 "$*" | sed -E 's/[[:space:]]?--self-update[[:space:]]?//g')
|
ARGS=$( "$@" )
|
||||||
|
|
||||||
SCRIPT=$(readlink -f "$0")
|
SCRIPT=$(readlink -f "$0")
|
||||||
SCRIPTPATH=$(dirname "$SCRIPT")
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
||||||
@ -22,7 +22,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[@]/[[:space:]]?--self-update[[:space:]]?}"
|
||||||
|
|
||||||
# Now exit this old instance
|
# Now exit this old instance
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user