]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- add usage
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 27 Nov 2007 21:37:05 +0000 (21:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    relup.sh -> 1.14

relup.sh

index ca8eb26bb5c3ccafa4d5471b6add4dc4004a0a13..9f3331b6fb6a9a145c249e2ad1cf86c6e28413ea 100644 (file)
--- a/relup.sh
+++ b/relup.sh
@@ -19,6 +19,19 @@ get_dump() {
        echo "$out"
 }
 
+usage="Usage:
+${0##*/} [-i] [-t] [-m <MESSAGE>] <SPECLIST>
+
+Options:
+-i
+  Try to increment package release
+-t
+  Test mode. do not commit
+-m
+  Specify commit message
+
+"
+
 get_release() {
        local specfile="$1"
        rel=$(awk '/^%define[   ]*_rel[         ]/{print $NF}' $specfile)
@@ -44,7 +57,7 @@ if [ ! -x /usr/bin/getopt ]; then
        exit 1
 fi
 
-t=$(getopt -o 'm:it' -n $(dirname "$0") -- "$@") || exit $?
+t=$(getopt -o 'm:ith' -n "${0##*/}" -- "$@") || exit $?
 # Note the quotes around `$t': they are essential!
 eval set -- "$t"
 
@@ -60,6 +73,10 @@ while true; do
                shift
                message="${1#- }"
                ;;
+       -h)
+               echo "$usage"
+               exit 0
+               ;;
        --)
                shift
                break
This page took 0.037716 seconds and 4 git commands to generate.