summaryrefslogtreecommitdiffstats
path: root/pkgup
diff options
context:
space:
mode:
Diffstat (limited to 'pkgup')
-rwxr-xr-xpkgup8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgup b/pkgup
index fb03148..80817cc 100755
--- a/pkgup
+++ b/pkgup
@@ -9,7 +9,11 @@ if [ $# -lt 2 ]; then
echo "usage $0 version commit"
exit 1
fi
-name=${3:$(basename $PWD)}
+if [ x$3 = x ]; then
+ name=$(basename $PWD)
+else
+ name=$(basename $3 .spec)
+fi
sed --regexp-extended \
--expression "/^Version:/s/[0-9.]+$/$1/" \
@@ -17,5 +21,5 @@ sed --regexp-extended \
--expression "/(github|gh)_commit/s/[0-9a-f]{40}$/$2/" \
--expression '/^Release:/s/[0-9.]+/1/' \
--expression "s/%changelog/%changelog\n* $rpmdate $vendor - $1-1\n- Update to $1\n/" \
- --in-place *spec
+ --in-place $name.spec