]> Creatis software - bbtk.git/blob - kernel/appli/bbCreatePackage/bbCreatePackage.sh.in
* Created vtk package
[bbtk.git] / kernel / appli / bbCreatePackage / bbCreatePackage.sh.in
1 #!/bin/bash
2 # creates the file architecture for a new user package
3
4 if [ $# -ne 1 ]
5     then
6     echo "usage : bbCreatePackage <package-folder-with-complete-path>"  
7     exit
8 fi
9
10 INPUT=@bbCreatePackage_DATA_PATH@
11 OUTPUT=$1
12
13 echo "----- Creating new black box package '$1' in repository '$OUTPUT' -----"
14
15 if [ -e $OUTPUT ] 
16     then 
17     echo "ERROR : Directory '$OUTPUT' already exists !"  
18     exit
19 fi
20
21
22 echo "-> Creating directory '$OUTPUT'"
23 mkdir $OUTPUT
24 echo "-> Creating file '$OUTPUT/CMakeLists.txt'"
25 cp ${INPUT}/PackageCMakeLists.txt ${OUTPUT}/CMakeLists.txt
26 echo "-> Creating directory '$OUTPUT/cmake'"
27 mkdir ${OUTPUT}/cmake
28 echo "-> Copying files in '$OUTPUT/cmake'"
29 cp ${INPUT}/cmake/*.cmake ${OUTPUT}/cmake/
30 cp ${INPUT}/cmake/*.in ${OUTPUT}/cmake/
31 echo "Done !" 
32 echo "Edit the file '$OUTPUT/CMakeLists.txt' to customize your package"