SPECS: relup.sh - massive commit support
glen
glen at pld-linux.org
Wed Oct 5 22:09:45 CEST 2005
Author: glen Date: Wed Oct 5 20:09:45 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- massive commit support
---- Files affected:
SPECS:
relup.sh (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SPECS/relup.sh
diff -u SPECS/relup.sh:1.1 SPECS/relup.sh:1.2
--- SPECS/relup.sh:1.1 Thu Sep 15 00:52:36 2005
+++ SPECS/relup.sh Wed Oct 5 22:09:40 2005
@@ -1,12 +1,14 @@
#!/bin/sh
# script to run after "rel up" style change.
# takes Release from spec and creates commit with message
+# groups similiar commits to gether.
# "- rel $rel"
set -e
specfile="$1"
get_dump() {
+ local specfile="$1"
rpm --specfile "$specfile" --define 'prep %dump' -q 2>&1
}
@@ -14,8 +16,16 @@
awk '/PACKAGE_RELEASE/{print $NF; exit}'
}
-rel=$(get_dump | get_release)
-echo "Release: $rel"
-if [ "$rel" ]; then
- cvs ci -m "- rel $rel" $specfile
-fi
+
+tmpd=$(mktemp -d "${TMPDIR:-/tmp}/relXXXXXX")
+for spec in "$@"; do
+ rel=$(get_dump "$spec" | get_release)
+ echo "$spec" >> "$tmpd/$rel"
+done
+
+for file in $(ls "$tmpd" 2>/dev/null); do
+ files=$(cat "$tmpd/$file")
+ rel=$(basename "$file")
+ cvs ci -m "- rel $rel" $files
+done
+rm -rf $tmpd
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/relup.sh?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list