forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·77 lines (61 loc) · 1.88 KB
/
deploy.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
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
#!/bin/bash
## deploy.sh - a bash script that generates a
## deployable PUBLIC bundle of Drake.
## DO NOT RUN THIS FROM THE TRUNK!!!!!
## You will need to run this from a working copy
## of the "drake" branch of robotlib.
## You need to always make sure that the following
## number actually matches the last version
## before copy - svn log --verbose --stop-on-copy
## will tell you what that is
SVN_LAST_REV_BEFORE_COPY=2845
SVN_SRC="https://svn.csail.mit.edu/locomotion/robotlib/trunk"
## TODO: change this once script is working
## this needs to be a working copy of the
## "drake" branch.
SVN_WORKING_COPY=`pwd`
## TODO: use credentials here. probably won't need this
## if we run from Hudson, or manually.
# SVN_USERNAME=""
# SNV_PASSWORD=""
## start by getting trunk merged over to us
echo "Going to svn merge trunk over to us..."
cd $SVN_WORKING_COPY
svn merge -r $SVN_LAST_REV_BEFORE_COPY:HEAD $SVN_SRC
echo "Done."
## Remove .svn directories.
echo "Removing all SVN housekeeping files..."
find . -depth -type d -name .svn -exec rm -rf {} \;
echo "Done."
# Remove dev directories
echo "Removing all dev directories..."
find . -depth -type d -name dev -exec rm -rf {} \;
echo "Done."
## Remove NORELEASE directories
echo "Getting rid of NORELEASE directories..."
for dir in `find . -type d -print`;
do
if [ -e $dir/.NORELEASE ]
then
echo "Removing $dir"
rm -rf $dir
fi
done
echo "Done."
## Remove NORELEASE files
echo "Getting rid of NORELEASE files..."
for file in `find . -type f`
do grep -q NORELEASE $file && rm $file
done
echo "Done."
echo "Release stripping is complete."
echo "Making a .tar.gz now..."
cd ../
tar cvf /tmp/drake.tar drake && gzip /tmp/drake.tar
echo "Done."
echo "The tar.gz is now at /tmp/drake.tar.gz."
echo "Making a .zip file now..."
zip -r /tmp/drake.zip drake
echo "Done."
echo "The zipfile is now at /tmp/drake.zip."
echo "All packaging is complete. Enjoy!"