-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.sh
executable file
·61 lines (50 loc) · 925 Bytes
/
package.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
#!/bin/bash
DOZIP=false
DODELETE=false
while getopts "v:zd" opt; do
case $opt in
v)
VERSION=$OPTARG
;;
z)
DOZIP=true
;;
d)
DODELETE=true
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
# Clone repository
git clone git://github.com/symphonycms/symphony-2.git symphony-$VERSION
# Checkout desired version
cd symphony-$VERSION
git checkout $VERSION
# Initialize submodules
git submodule update --init
# Clone Workspace
git clone git://github.com/symphonycms/workspace.git
# Checkout latest version of workspace
cd workspace
git checkout integration
cd ../
# Remove Git cruft
for i in `find . -name '.git*'`; do
rm -rf $i
done
cd ../
# Zip it
if [ $DOZIP == true ]; then
zip -r symphony$VERSION.zip symphony-$VERSION
fi
# Delete folder
if [ $DODELETE == true ]; then
rm -rf symphony-$VERSION/
fi