summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-03-12 12:14:46 +0100
committerRemi Collet <fedora@famillecollet.com>2015-03-12 12:14:46 +0100
commitb762a52c453d447d2b63dcfeb4abe44f71a9f7fc (patch)
tree763504ecf8a075b36ae3d09c912bb13032e18aba
parent198ede648f9b88d9bc536d10ddfe8cd97d785e7c (diff)
php-pecl-http: 2.3.2
-rwxr-xr-xpearup9
1 files changed, 5 insertions, 4 deletions
diff --git a/pearup b/pearup
index 548e4a0..45f5330 100755
--- a/pearup
+++ b/pearup
@@ -2,26 +2,27 @@
vendor="Remi Collet <remi@fedoraproject.org>"
rpmdate=$(LC_ALL="C" date +"%a %b %d %Y")
+name=$(basename $PWD)
if [ $# -lt 2 ]; then
echo "usage $0 old new"
exit 1
fi
-if ! grep -q pecl_name *spec; then
+if ! grep -q pecl_name $name.spec; then
sed -e '/^Release:/s/[0-9].*$/1%{?dist}/' \
-i *spec
else echo "Release inchangée"
fi
-if ! grep -q "^Version:.*$2" *spec; then
+if ! grep -q "^Version:.*$2" $name.spec; then
sed -e "/^Version:/s/$1/$2/" \
-e "s/%changelog/%changelog\n* $rpmdate $vendor - $2-1\n- Update to $2\n/" \
-e 's/\$RPM_BUILD_ROOT/%{buildroot}/' \
- -i *spec
+ -i $name.spec
else echo "Version déjà modifiée"
fi
-spectool -g -S *spec
+spectool -g -S $name.spec
tar xf *-$1.tgz package.xml && mv package.xml package-$1.xml
comp=$(tar xvf *-$1.tgz '*/composer.json')