From 5913503be2725e43b888fdaea5c081196ff36e09 Mon Sep 17 00:00:00 2001 From: Dave Kennedy Date: Wed, 10 Feb 2016 23:45:57 -0700 Subject: [PATCH] Don't run without a target --- mkstage4.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mkstage4.sh b/mkstage4.sh index 14330d9..e107edc 100755 --- a/mkstage4.sh +++ b/mkstage4.sh @@ -41,6 +41,19 @@ while getopts ':t:sqcb' flag; do esac done +if [ "$TARGET" == "" ] +then + echo "`basename $0`: no target specified." + echo "syntax:" + echo "\$ `basename $0` [-q -c -b] [-s || -t ] [custom-tar-options]" + echo "-q: activates quiet mode (no confirmation)." + echo "-c: excludes connman network lists." + echo "-b: excludes boot directory." + echo "-s: makes tarball of current system." + echo "-t: makes tarball of system located at the ." + exit 1 +fi + # shifts pointer to read mandatory output file specification shift $(($OPTIND - 1)) ARCHIVE=$1