-
Notifications
You must be signed in to change notification settings - Fork 21
/
create_dist
executable file
·69 lines (50 loc) · 1.16 KB
/
create_dist
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
# CoLoR, a Coq library on rewriting and termination.
# See the COPYRIGHTS and LICENSE files.
#
# - Frederic Blanqui, 2005-02-03
prog=`basename $0`
usage () { echo "usage: $prog [-h] [version_name]"; }
help () {
cat <<EOF
Creates a tar.gz file of CoLoR sources from the SVN archive.
Options:
-h Provide this help and exit
EOF
}
case "$1" in
-h) usage; echo; help; exit 0;;
esac
if test $# -gt 0; then version=$1; shift; else version=`date +%y%m%d`; fi
if test $# -ne 0; then usage; exit 1; fi
cwd=`pwd`
cd /tmp
rm -rf color
git clone [email protected]:fblanqui/color.git
rm -rf color/.git
create_tar_gz () {
echo create $dir.tar.gz ...
tar cf $dir.tar $dir
gzip $dir.tar
mv $dir.tar.gz $cwd
rm -rf $dir
}
# Coccinelle for CoLoR
dir=coccinelle_for_color.$version
rm -rf $dir
cp -r color/Coccinelle $dir
create_tar_gz
# CoLoR without Coccinelle
dir=color.$version
rm -rf $dir
cp -r color $dir
rm -rf $dir/Coccinelle $dir/Conversion/Coccinelle.v
head -n -3 color/README.md > $dir/README.md
create_tar_gz
md5sum $cwd/$dir.tar.gz
# CoLoR with Coccinelle
dir=color_with_coccinelle.$version
rm -rf $dir
cp -r color $dir
create_tar_gz
rm -rf color