From 8a3673da55bcdccc711e1d0164e08584cd2675ec Mon Sep 17 00:00:00 2001 From: prascle Date: Thu, 2 Feb 2006 07:46:21 +0000 Subject: [PATCH] PR: add some checks --- bin/createAppli.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/createAppli.sh b/bin/createAppli.sh index c6c4de072..1ff6ed6de 100755 --- a/bin/createAppli.sh +++ b/bin/createAppli.sh @@ -3,5 +3,15 @@ comName=`which $0` rep=`dirname $comName` -cp -r $rep/appliskel $1 -chmod +x $1/*.sh $1/run* $1/envd +if [ $# -ne 1 ] + echo "--- usage:" + echo $0 AppliName + echo "--- In which AppliName is a directory to create with SALOME application scripts" +elif [ -d $1] + echo $1 "directory already exists, nothing done" +else + mkdir -p $1 + cp -r $rep/appliskel/* $1 + cp $rep/appliskel/.bashrc $1 + chmod +x $1/*.sh $1/run* $1/envd +fi \ No newline at end of file -- 2.39.2