]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools: setup-virtualenv.sh: check for mandatory argument
authorNathan Cutler <ncutler@suse.com>
Fri, 23 Mar 2018 10:20:45 +0000 (11:20 +0100)
committerNathan Cutler <ncutler@suse.com>
Fri, 23 Mar 2018 10:21:23 +0000 (11:21 +0100)
Signed-off-by: Nathan Cutler <ncutler@suse.com>
src/tools/setup-virtualenv.sh

index f991b21c022a6fa2c3cb566fa34ff9429f5f0df3..9d888ce8cb0c908a20c1ad6029808006e1afb561 100755 (executable)
@@ -30,6 +30,10 @@ while true ; do
 done
 
 DIR=$1
+if [ -z "$DIR" ] ; then
+    echo "$SCRIPTNAME: need directory path in which to create virtualenv"
+    exit 1
+fi
 rm -fr $DIR
 mkdir -p $DIR
 virtualenv --python $PYTHON_BINARY $DIR