summaryrefslogtreecommitdiffstats
path: root/strip.sh
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-09-07 10:11:52 +0200
committerRemi Collet <fedora@famillecollet.com>2014-09-07 10:11:52 +0200
commit532deba01c43eaf456e02f0a8aa88d77627a7ab1 (patch)
treeebdbae87c2702173d6d84ae5e9ea37f15ed33a5b /strip.sh
parent628026478222adad3010277899dabd4227306b48 (diff)
php-phalcon: optimized sources
Diffstat (limited to 'strip.sh')
-rwxr-xr-xstrip.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/strip.sh b/strip.sh
new file mode 100755
index 0000000..b0cfa29
--- /dev/null
+++ b/strip.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+if [ $# -lt 2 ]; then
+ echo usage $0 version commit
+ exit 1
+fi
+
+owner=phalcon
+project=cphalcon
+version=$1
+commit=$2
+upstream=$project-$version.tar.gz
+downstream=$project-$version-strip.tar.bz2
+list1=$(mktemp)
+list2=$(mktemp)
+
+if [ ! -f $upstream ]; then
+ wget https://github.com/$owner/$project/archive/$commit/$upstream
+fi
+if [ ! -f $upstream ]; then
+ echo missgin upstream archive
+else
+ echo Unpacking...
+ tar tf $upstream >$list1
+ tar xf $upstream
+ echo Cleaning non-free stuff...
+ rm $project-$commit/ext/assets/filters/jsminifier.? \
+ $project-$commit/ext/assets/filters/cssminifier.? \
+ $project-$commit/build/*/phalcon.?
+ echo Packing...
+ tar cjf $downstream $project-$commit
+ tar tf $downstream >$list2
+ echo "Diffing..."
+ diff $list1 $list2
+fi
+
+rm -f $list1 $list2 \ No newline at end of file