From 532deba01c43eaf456e02f0a8aa88d77627a7ab1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 7 Sep 2014 10:11:52 +0200 Subject: php-phalcon: optimized sources --- strip.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 strip.sh (limited to 'strip.sh') 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 -- cgit