set PACK=%2
set AUTHOR=%3
set DESCRIPTION=%4
+set PACK_DIRECTORY=bbtk_%PACK%_PKG
echo output= %OUTPUT%
echo bin = %BINPATH%
echo pack = %PACK%
echo author = %AUTHOR%
echo description = %DESCRIPTION%
+echo pack_directory = %PACK_DIRECTORY%
-IF EXIST %OUTPUT%\%PACK% GOTO ERROR02
+IF EXIST %OUTPUT%\%PACK_DIRECTORY% GOTO ERROR02
echo "** Creating new black box package '%PACK%' in folder '%OUTPUT%'"
-mkdir %OUTPUT%\%PACK%
-xcopy %INPUT% %OUTPUT%\%PACK% /S
-"%BINPATH%\bbSed" %OUTPUT%\%PACK%\CMakeLists.txt WITHOUT_NAME "%PACK%" > %OUTPUT%\%PACK%\CMakeLists2.txt
-"%BINPATH%\bbSed" %OUTPUT%\%PACK%\CMakeLists2.txt WITHOUT_AUTHOR %AUTHOR% > %OUTPUT%\%PACK%\CMakeLists3.txt
-"%BINPATH%\bbSed" %OUTPUT%\%PACK%\CMakeLists3.txt WITHOUT_DESCRIPTION %DESCRIPTION% > %OUTPUT%\%PACK%\CMakeLists.txt
-del "%OUTPUT%\%PACK%\CMakeLists2.txt"
-del "%OUTPUT%\%PACK%\CMakeLists3.txt"
+mkdir %OUTPUT%\%PACK_DIRECTORY%
+xcopy %INPUT% %OUTPUT%\%PACK_DIRECTORY% /S
+"%BINPATH%\bbSed" %OUTPUT%\%PACK_DIRECTORY%\CMakeLists.txt WITHOUT_NAME "%PACK%" > %OUTPUT%\%PACK_DIRECTORY%\CMakeLists2.txt
+"%BINPATH%\bbSed" %OUTPUT%\%PACK_DIRECTORY%\CMakeLists2.txt WITHOUT_AUTHOR %AUTHOR% > %OUTPUT%\%PACK_DIRECTORY%\CMakeLists3.txt
+"%BINPATH%\bbSed" %OUTPUT%\%PACK_DIRECTORY%\CMakeLists3.txt WITHOUT_DESCRIPTION %DESCRIPTION% > %OUTPUT%\%PACK_DIRECTORY%\CMakeLists.txt
+del "%OUTPUT%\%PACK_DIRECTORY%\CMakeLists2.txt"
+del "%OUTPUT%\%PACK_DIRECTORY%\CMakeLists3.txt"
echo "Done !"
-echo "Edit the file '%OUTPUT%\%PACK%\CMakeLists.txt' to customize your package"
+echo "Edit the file '%OUTPUT%\%PACK_DIRECTORY%\CMakeLists.txt' to customize your package"
goto END
:ERROR02
-echo "ERROR : Directory '%OUTPUT%/%PACK%' already exists !"
+echo "ERROR : Directory '%OUTPUT%/%PACK_DIRECTORY%' already exists !"
goto end