From 8ac7b496d9d53d7789e68df0aa55c60f97569f9d Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Mon, 13 Jun 2022 14:59:37 -0600 Subject: [PATCH] regex --- heavy_script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heavy_script.sh b/heavy_script.sh index 62db01d7..d7ce4cce 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -4,7 +4,7 @@ [[ -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") SCRIPTPATH=$(dirname "$SCRIPT") SCRIPTNAME="$0" @@ -21,7 +21,7 @@ git fetch git checkout $BRANCH git pull --force echo "Running the new version..." - exec bash "$SCRIPTNAME" "${ARGS[@]}" + exec bash "$SCRIPTNAME" ${ARGS[@]} # Now exit this old instance exit 1