-
Notifications
You must be signed in to change notification settings - Fork 3
/
new_release.sh
executable file
·40 lines (36 loc) · 1.08 KB
/
new_release.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
31
32
33
34
35
36
37
38
39
40
echo $(pwd)
#create tmp directory and copy all files
mkdir release/tmp
cp -r ccgen release/tmp
mkdir release/tmp/configs
cp -r docs release/tmp
cp -r listener release/tmp
mkdir release/tmp/messages
mkdir release/tmp/out
mkdir release/tmp/pcaps
cp -r spammer release/tmp
cp install.sh release/tmp
cp LICENSE release/tmp
cp README.md release/tmp
cp requirements.txt release/tmp
cp run.sh release/tmp
#remove unnecessary files
rm -r release/tmp/ccgen/__pycache__/
rm -r release/tmp/ccgen/data/*
cp ccgen/data/ccgen_data_default.db release/tmp/ccgen/data/ccgen_data.db
rm -r release/tmp/ccgen/util/__pycache__/
rm -r release/tmp/ccgen/wrapper/__pycache__/
rm -r release/tmp/ccgen/wrapper/go-flows-master/*
rm -r release/tmp/ccgen/wrapper/temp/*
rm -r release/tmp/listener/__pycache__/
cp messages/example.txt release/tmp/messages/
cp pcaps/empty.pcap release/tmp/pcaps/
rm -r release/tmp/spammer/__pycache__/
rm -r release/tmp/spammer/.vagrant
rm -r release/tmp/spammer/Vagrantfile
#create tar.gz
CODE=$(date +%s)
cd release/tmp
tar -czvf $(pwd)/../CCgen.v2_$CODE.tar.gz *
#remove tmp folder
rm -r ../tmp