-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·82 lines (70 loc) · 2.46 KB
/
package.sh
File metadata and controls
executable file
·82 lines (70 loc) · 2.46 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
# Copyright 2011 Cornell University
#
#
# This file is part of EventML - a tool aiming at specifying
# distributed protocols in an ML like language. It is an interface
# to the logic of events and is compiled into Nuprl. It is written
# by the NUPRL group of Cornell University, Ithaca, NY.
#
# EventML is a free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# EventML is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EventML. If not, see <http://www.gnu.org/licenses/>.
#
# o Authors: Vincent Rahli
# o Affiliation: Cornell University, NUPRL group
# o Date: 20 May 2011
# o File name: package.sh
# o Description: Packaging script
#
VERSION=0.4
TMP_NUPRL=/tmp/nuprl
ABOVE=`(cd ..;pwd)`
echo "Packaging starting."
echo
# Clone repo to a tmp directory
echo " ------ Cloning repository..."
git clone -q ../. ${TMP_NUPRL}
echo
# Remove the papers dir from the copied repo
echo " ------ Removing unecessary files from cloned repository..."
rm -rf ${TMP_NUPRL}/eventml/papers
rm -rf ${TMP_NUPRL}/eventml/docs/mutex
rm -rf ${TMP_NUPRL}/eventml/docs/darpa
rm -rf ${TMP_NUPRL}/eventml/docs/nuprlprint
rm -rf ${TMP_NUPRL}/eventml/docs/paxos
rm -rf ${TMP_NUPRL}/eventml/tex/jbw*
rm -rf ${TMP_NUPRL}/eventml/evaluators/erlang
rm -rf ${TMP_NUPRL}/eventml/evaluators/scala
echo
# Rename the eventml dir so that it contains the version number
# and so that it is called eventml
echo " ------ Appending version number to the directory to package..."
mv ${TMP_NUPRL}/eventml ${TMP_NUPRL}/eventml-${VERSION}
echo
# Generate configure from configure.ac
echo " ------ Running autoconf..."
(cd ${TMP_NUPRL}/eventml-${VERSION}; autoconf)
echo
# Archive the eventml dir
echo " ------ Archiving directory..."
(cd ${TMP_NUPRL}; tar -czf eventml_${VERSION}-src.tar.gz eventml-${VERSION})
echo
# Move the archive to the repo
echo " ------ Moving the archive to ${ABOVE}..."
mv ${TMP_NUPRL}/eventml_${VERSION}-src.tar.gz ..
echo
# Remove the tmp copied repo
echo " ------ Removing the clones repository..."
rm -rf ${TMP_NUPRL}
echo
echo "Packaging done."