]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- add -m option for message (NOTE: use it without leading dash!)
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 8 Dec 2006 14:22:46 +0000 (14:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    relup.sh -> 1.9

relup.sh

index 73269e9685b1e5d36569e8c10db98066ef7018e2..56fe5cc98c208c3d737dd4969583e83f0eae6b69 100644 (file)
--- a/relup.sh
+++ b/relup.sh
@@ -29,6 +29,33 @@ get_release() {
        echo $rel
 }
 
+if [ ! -x /usr/bin/getopt ]; then
+       echo >&1 "You need to install util-linux to use relup.sh"
+       exit 1
+fi
+
+t=`getopt -o 'm:' -n $(dirname "$0") -- "$@"` || exit $?
+# Note the quotes around `$TEMP': they are essential!
+eval set -- "$t"
+
+while true; do
+       case "$1" in
+       -m)
+               shift
+               message="$1"
+               ;;
+       --)
+               shift
+               break
+       ;;
+       *)
+               echo 2>&1 "Internal error: [$1] not recognized!"
+               exit 1
+               ;;
+       esac
+       shift
+done
+
 tmpd=$(mktemp -d "${TMPDIR:-/tmp}/relXXXXXX")
 for spec in "$@"; do
        spec=${spec%.spec}.spec
@@ -39,6 +66,7 @@ done
 for file in $(ls "$tmpd" 2>/dev/null); do
        files=$(cat "$tmpd/$file")
        rel=$(basename "$file")
-       cvs ci -m "- rel $rel" $files
+       echo cvs ci -m "'- rel $rel${message:+ ($message)}'"
+       cvs ci -m "$msg" $files
 done
 rm -rf $tmpd
This page took 0.03571 seconds and 4 git commands to generate.