]> Creatis software - crea.git/blobdiff - appli/creaNewProject/creaNewProject.sh.in
creaNewProject creates new Package at the same time
[crea.git] / appli / creaNewProject / creaNewProject.sh.in
index e2d12b67d02535e59c4d952c3891cd3ff46c8e0c..f9d229e8681bfc4751ddc31b72d0955e7ad7576f 100755 (executable)
@@ -3,7 +3,7 @@
 
 if [ $# -lt 2 ]
     then
-    echo "usage : creaNewProject <project-path> <project-name>"  
+    echo "usage : creaNewProject <project-path> <project-name>" 
     exit
 fi
 
@@ -11,28 +11,28 @@ fi
 TMP=$(which $0|rev)
 BINPATH=$(echo ${TMP#*/}|rev)
 # Input data path
-INPUT=${BINPATH}/creaNewProject_data
+INPUT=${BINPATH}/../share/creaNewProject
 
 OUTPUT=$1
 PROJECT=$2
 
-#echo "output = " $OUTPUT
-#echo "bin    = " $BINPATH
-#echo "input  = " $INPUT
-#echo "project= " $PROJECT
+echo "output = " $OUTPUT
+echo "bin    = " $BINPATH
+echo "input  = " $INPUT
+echo "project= " $PROJECT
 
-if [ -d $OUTPUT/${PROJECT} ] 
+if [ -d $OUTPUT/${PROJECT} ]
     then 
-    echo "ERROR : Directory '$OUTPUT/${PROJECT}' already exists !"  
-    exit
+    echo "ERROR : Directory '$OUTPUT/${PROJECT}' already exists !"
+    exit 1
 fi
 
 echo "** Creating new project '$PROJECT' in folder '$OUTPUT'"
 
-if [ ! -d $OUTPUT ] 
+if [ ! -d $OUTPUT ]
     then 
-    echo "ERROR : Directory '$OUTPUT' does not exist !"  
-    exit
+    echo "ERROR : Directory '$OUTPUT' does not exist !"
+    exit 1
 fi
 
 cp -R ${INPUT} "$OUTPUT/$PROJECT"
@@ -41,5 +41,11 @@ cd $OUTPUT/$PROJECT
 cat CMakeLists.txt.in | sed s,PROJECT_NAME,"${PROJECT}", > CMakeLists.txt
 rm CMakeLists.txt.in
 
-echo "Done !" 
-echo "Edit the file '$OUTPUT/${PROJECT}/CMakeLists.txt' to customize your project"
+echo
+echo "New Project created !" 
+echo
+echo "==>"
+echo "==> Edit the file '$OUTPUT/${PROJECT}/CMakeLists.txt' to customize your project"
+echo "==>"
+echo
+echo