summaryrefslogtreecommitdiffstats
path: root/strip.sh
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-14 15:10:54 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-14 15:10:54 +0200
commite8aab031630bc88a0ed0ec99c09e926003c4ca98 (patch)
treebbb3b8dffd2e148b38c22383fd63f12239fe72d5 /strip.sh
parent21778ef59e73e3576c1dcf7ff532243f7a092608 (diff)
PHP 5.6.27
Diffstat (limited to 'strip.sh')
-rwxr-xr-xstrip.sh22
1 files changed, 17 insertions, 5 deletions
diff --git a/strip.sh b/strip.sh
index 5939bec..1bd5c25 100755
--- a/strip.sh
+++ b/strip.sh
@@ -11,15 +11,27 @@ fi
old=$(mktemp)
new=$(mktemp)
+ver=$1
+shift
+
echo "Untar..."
-tar xf php-$1.tar.xz
-rm -rf php-$1/ext/json
+tar xf php-$ver.tar.xz
+pushd php-$ver
+rm -rf ext/json
+if [ -n "$2" ]
+then
+ for i in $*
+ do
+ patch -p1 --no-backup <../$i
+ done
+fi
+popd
echo "Tar..."
-tar cJf php-$1-strip.tar.xz php-$1
+tar cJf php-$ver-strip.tar.xz php-$ver
echo "Diff..."
-tar tf php-$1.tar.xz | sort >$old
-tar tf php-$1-strip.tar.xz | sort >$new
+tar tf php-$ver.tar.xz | sort >$old
+tar tf php-$ver-strip.tar.xz | sort >$new
diff $old $new
rm -f $old $new