diff options
Diffstat (limited to 'pkgup')
-rwxr-xr-x | pkgup | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -6,13 +6,18 @@ rpmdate=${rpmdate/ 0/ } name=$(basename $PWD) if [ $# -lt 2 ]; then - echo "usage $0 version commit" + echo "usage $0 version commit [ date [ spec ]]" exit 1 fi if [ x$3 = x ]; then + date=$(date +%Y-%m-%d) +else + date=$3 +fi +if [ x$4 = x ]; then name=$(basename $PWD) else - name=$(basename $3 .spec) + name=$(basename $4 .spec) fi sed --regexp-extended \ @@ -20,6 +25,7 @@ sed --regexp-extended \ --expression "/github_version/s/[0-9.]+$/$1/" \ --expression "/upstream_version/s/[0-9.]+$/$1/" \ --expression "/(github|gh)_commit/s/[0-9a-f]{40}$/$2/" \ + --expression "/(github|gh)_date/s/[0-9\-]{10}$/$date/" \ --expression '/^Release:/s/[0-9.]+/1/' \ --expression "s/%changelog/%changelog\n* $rpmdate $vendor - $1-1\n- update to $1\n/" \ --in-place $name.spec |