diff --git a/makeself-header.sh b/makeself-header.sh index 75ba95f3..8e09be93 100755 --- a/makeself-header.sh +++ b/makeself-header.sh @@ -289,7 +289,7 @@ EOLSM --tar) offset=\`head -n $SKIP "\$0" | wc -c | tr -d " "\` arg1="\$2" - shift 2 + if ! shift 2; then MS_Help; exit 1; fi for s in \$filesizes do MS_dd "\$0" \$offset \$s | eval "$GUNZIP_CMD" | tar "\$arg1" - \$* @@ -316,7 +316,7 @@ EOLSM --target) keep=y targetdir=\${2:-.} - shift 2 + if ! shift 2; then MS_Help; exit 1; fi ;; --noprogress) noprogress=y diff --git a/makeself.sh b/makeself.sh index b88e1c6f..fed0f1ff 100755 --- a/makeself.sh +++ b/makeself.sh @@ -201,16 +201,16 @@ do --target) TARGETDIR="$2" KEEP=y - shift 2 + if ! shift 2; then MS_Help; exit 1; fi ;; --header) HEADER="$2" - shift 2 + if ! shift 2; then MS_Help; exit 1; fi ;; --license) - LICENSE=`cat $2` - shift 2 - ;; + LICENSE=`cat $2` + if ! shift 2; then MS_Help; exit 1; fi + ;; --follow) TAR_ARGS=cvfh DU_ARGS=-ksL @@ -241,7 +241,7 @@ do ;; --lsm) LSM_CMD="cat \"$2\" >> \"\$archname\"" - shift 2 + if ! shift 2; then MS_Help; exit 1; fi ;; -q | --quiet) QUIET=y