forked from fusonic/chive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchiveExport.sh
More file actions
executable file
·36 lines (29 loc) · 889 Bytes
/
Copy patharchiveExport.sh
File metadata and controls
executable file
·36 lines (29 loc) · 889 Bytes
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
#!/bin/sh
VERSION=chive_$1
rm -rf /tmp/$VERSION/
mkdir /tmp/$VERSION/
mkdir /tmp/$VERSION/chive/
echo exporting to /tmp/$VERSION/chive/
bzr export /tmp/$VERSION/chive/
chmod 0777 -R /tmp/$VERSION/chive/assets
chmod 0777 -R /tmp/$VERSION/chive/protected/runtime/
cd /tmp/$VERSION/
touch chive/index_changed.php
cat chive/index.php | sed "s/'YII_DEBUG', true/'YII_DEBUG', false/" >> chive/index_changed.php
rm chive/index.php
rm chive/archiveExport.sh
rm chive/protected/tests -rf
mv chive/pharExport.php pharExport.php
mv chive/index_changed.php chive/index.php
tar czf chive_$1.tar.gz chive
zip -rq chive_$1.zip chive
# Download JSMin
echo 'Download & compile JSMin ...'
wget https://raw.github.com/douglascrockford/JSMin/master/jsmin.c
gcc -o jsmin jsmin.c
# Do phar export
echo 'Run phar export ...'
/usr/bin/php pharExport.php $1
rm pharExport.php
# Delete JSMin
rm jsmin jsmin.c