SPECS: relup.sh (NEW) - helper script on commiting

glen glen at pld-linux.org
Thu Sep 15 00:52:42 CEST 2005


Author: glen                         Date: Wed Sep 14 22:52:42 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- helper script on commiting

---- Files affected:
SPECS:
   relup.sh (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/relup.sh
diff -u /dev/null SPECS/relup.sh:1.1
--- /dev/null	Thu Sep 15 00:52:42 2005
+++ SPECS/relup.sh	Thu Sep 15 00:52:36 2005
@@ -0,0 +1,21 @@
+#!/bin/sh
+# script to run after "rel up" style change.
+# takes Release from spec and creates commit with message
+# "- rel $rel"
+
+set -e
+specfile="$1"
+
+get_dump() {
+	rpm --specfile "$specfile" --define 'prep %dump'  -q 2>&1
+}
+
+get_release() {
+	awk '/PACKAGE_RELEASE/{print $NF; exit}'
+}
+
+rel=$(get_dump | get_release)
+echo "Release: $rel"
+if [ "$rel" ]; then
+	cvs ci -m "- rel $rel" $specfile
+fi
================================================================



More information about the pld-cvs-commit mailing list