#!/bin/bash # creates the file architecture for a new user package if [ $# -ne 1 ] then echo "usage : bbCreatePackage " exit fi INPUT=@bbCreatePackage_DATA_PATH@ OUTPUT=$1 echo "----- Creating new black box package '$1' in repository '$OUTPUT' -----" if [ -e $OUTPUT ] then echo "ERROR : Directory '$OUTPUT' already exists !" exit fi echo "-> Creating directory '$OUTPUT'" mkdir $OUTPUT echo "-> Creating file '$OUTPUT/CMakeLists.txt'" cp ${INPUT}/PackageCMakeLists.txt ${OUTPUT}/CMakeLists.txt echo "-> Creating directory '$OUTPUT/cmake'" mkdir ${OUTPUT}/cmake echo "-> Copying files in '$OUTPUT/cmake'" cp ${INPUT}/cmake/*.cmake ${OUTPUT}/cmake/ cp ${INPUT}/cmake/*.in ${OUTPUT}/cmake/ echo "Done !" echo "Edit the file '$OUTPUT/CMakeLists.txt' to customize your package"