-
Notifications
You must be signed in to change notification settings - Fork 0
/
create.sh
30 lines (22 loc) · 774 Bytes
/
create.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
echo "Provide name of the project: "
read input
uppercasedInput=`echo $input | tr "[:lower:]" "[:upper:]"`
lowercasedInput=`echo $input | tr "[:upper:]" "[:lower:]"`
now=`date +%s%3N`
output="output-$now"
zipname="$input-$now.zip"
if [ ! -d "$output" ]; then
mkdir $output
fi
cp ./template/entities.xml $output
sed -i "" "s/HAFWUEARC42/$uppercasedInput/g" "$output/entities.xml"
sed -i "" "s/hafwuearc42/$lowercasedInput/g" "$output/entities.xml"
cp ./template/exportDescriptor.properties $output
sed -i "" "s/HAFWUEARC42/$uppercasedInput/g" "$output/exportDescriptor.properties"
sed -i "" "s/hafwuearc42/$lowercasedInput/g" "$output/exportDescriptor.properties"
cp -r ./template/attachments $output
cd $output
zip -r ../$zipname .
cd ..
rm -rf $output