diff options
Diffstat (limited to 'strip.sh')
-rwxr-xr-x | strip.sh | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -4,7 +4,13 @@ if [ -z "$1" ]; then echo "usage $0 version" exit 1; fi -if [ ! -f php-$1.tar.xz ]; then +if [ -f php-$1.tar.xz ]; then + arc=php-$1.tar.xz + +elif [ -f php-$1.tar.gz ]; then + arc=php-$1.tar.gz + +else echo "missing php-$1.tar.xz archive" exit 2; fi @@ -12,13 +18,13 @@ old=$(mktemp) new=$(mktemp) echo "Untar..." -tar xf php-$1.tar.xz +tar xf $arc rm -rf php-$1/ext/json echo "Tar..." tar cJf php-$1-strip.tar.xz php-$1 echo "Diff..." -tar tf php-$1.tar.xz | sort >$old +tar tf $arc | sort >$old tar tf php-$1-strip.tar.xz | sort >$new diff $old $new |