genheader.sh: add extra check for when script is sourced

Signed-off-by: John McMaster <johndmcmaster@gmail.com>
This commit is contained in:
John McMaster 2018-10-03 16:20:23 -07:00
parent 6df3b2b364
commit 409dd72f3b
1 changed files with 5 additions and 4 deletions

View File

@ -7,8 +7,9 @@ fi
set -ex
test $# = 1
test ! -e $1
mkdir $1
cd $1
# for some reason on sourced script set -e doesn't work
test $# = 1 || exit 1
test ! -e "$1"
mkdir "$1"
cd "$1"