Fix options. Add descriptions for -a|--no-auxfiles and -c|--no-changelog.
authoridl0r <idl0r@gentoo.org>
Mon, 25 Oct 2010 17:00:36 +0000 (17:00 -0000)
committeridl0r <idl0r@gentoo.org>
Mon, 25 Oct 2010 17:00:36 +0000 (17:00 -0000)
svn path=/trunk/gentoolkit-dev/; revision=821

ChangeLog
src/ebump/ebump

index db498db2fd7f5a9c2e343a4b3a5e6051a45a50ea..519580947dcfd1f0dfd4e110abf065b0465720c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2010-10-25: Christian Ruppert <idl0r@gentoo.org>
        * ebump: Whitespace fixes.
+               Fix options. Add descriptions for -a|--no-auxfiles and -c|--no-changelog.
+
 
 2010-10-23: Christian Ruppert <idl0r@gentoo.org>
        * echangelog: Fix version bump detection for hg/mercurial, bug 335636,
index 58ffb1a13ebc0a1d48d3128bc005f56a7fdd29e8..5de44138048635fee973c01298e8cfa309c8b53d 100755 (executable)
@@ -19,7 +19,7 @@ die() {
 }
 
 einfo() {
-       if [ ${opt_verbosity} -gt 1 ] ; then
+       if [ ${opt_verbosity} -eq 1 ] ; then
                echo $*
        fi
 }
@@ -37,6 +37,8 @@ print_usage() {
        echo "  -V|--version           show version info"
        echo "  -v|--verbose           increase verbosity"
        echo "  -q|--quiet             turn off output"
+       echo "  -a|--no-auxfiles       don't bump auxfiles (files/*)"
+       echo "  -c|--no-changelog      do not update ChangeLog (via echangelog)"
        echo "  -C|--no-vcs            do not add to VCS"
        echo "  -m|--message           append message to ChangeLog"
        echo "  -d|--delete-old        delete previous revision from VCS (DANGEROUS!)"
@@ -322,8 +324,7 @@ original_params=${#}
 #
 # Global options
 #
-opt_verbosity=1
-opt_warn_on_delete=y
+opt_verbosity=0
 opt_add_changelog=y
 opt_add_vcs=y
 opt_bump_auxfiles=y
@@ -332,43 +333,53 @@ opt_commitmessage=""
 
 load_options
 
-skip=0
 while [ ${#} -gt 0 ] ; do
        arg=${1}
        shift
-       if [ ${skip} -gt 0 ] ; then
-       skip=$[skip-1]
-       else
+
        case ${arg} in
-       -h|--help)
-               print_usage
-               exit 0
+               -h|--help)
+                       print_usage
+                       exit 0
                ;;
-       -m|--message)
-               opt_commitmessage="${1}"
-               skip=1
+               -m|--message)
+                       opt_commitmessage="${1}"
+                       shift
+                       continue
                ;;
-       -C|--no-vcs)
-               opt_add_vcs=n
+               -a|--no-auxfiles)
+                       opt_bump_auxfiles=n
+                       continue
                ;;
-       -V|--version)
-               print_version
-               exit
+               -c|--no-changelog)
+                       opt_add_changelog=n
+                       continue
                ;;
-       -v|--verbose)
-               opt_verbosity=$[opt_verbosity + 1]
+               -C|--no-vcs)
+                       opt_add_vcs=n
+                       continue
                ;;
-       -q|--quiet)
-               opt_verbosity=0
+               -V|--version)
+                       print_version
+                       exit
                ;;
-       -d|--delete-old)
-               opt_delete_old=y
+               -v|--verbose)
+                       opt_verbosity=1
+                       continue
                ;;
-       *)
-               ebuild_arg=${arg}
+               -q|--quiet)
+                       opt_verbosity=0
+                       continue
+               ;;
+               -d|--delete-old)
+                       opt_delete_old=y
+                       continue
+               ;;
+               *)
+                       ebuild_arg=${arg}
+                       continue
                ;;
        esac
-       fi
 done
 
 _vcs=$(get_vcs)