fixed the copy error
[otp-base.git] / tools / release_generator
blobeab8f40a04efb02ddc76329e73f3b6fc4adbf8b7
1 #!/bin/sh
3 cd $(dirname $0)
6 if [ "$#" != "1" ];then
7 echo ""
8 echo "usage: $0 <release-name>"
9 echo ""
10 echo ""
11 echo "example: $0 chat_server"
12 echo ""
13 exit 1
16 if [ -e ../release/$1 ];then
17 echo "a release with name $1 already exists would you like to delete it [y|N] $> \c"
18 read DEL
19 if [ "$DEL" != "y" ];then
20 echo "aborting release creation"
21 exit 1
23 echo "deleting $1"
24 rm -rf ../release/$1
27 REL_NAME=$1
28 REL_NAME_UPPER_CASE=$(echo $REL_NAME | tr a-z A-Z)
30 cd .appgen
31 echo `pwd`
33 rm -rf $REL_NAME
34 cp -r blank_app_rel $REL_NAME
36 cd $REL_NAME
37 ls blank_app* | ../rename.sh blank_app $REL_NAME
38 cd ..
40 # The base directory of the release
41 ./substitute.sh %%REL_NAME%% $REL_NAME $REL_NAME/$REL_NAME.rel.src
42 ./substitute.sh %%REL_NAME%% $REL_NAME $REL_NAME/$REL_NAME.src
45 mv $REL_NAME ../../release
47 echo ""
48 echo "$REL_NAME has been generated and placed under release/$REL_NAME"
49 echo ""