From 2b3f235988b45c3c11d57fedad12587b1536fdac Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 10 Mar 2012 21:54:59 -0500 Subject: etc-update: add a --preen flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a flag to merge just trivial updates and then quit. URL: http://bugs.gentoo.org/159080 Reported-by: Iván Pérez Domínguez Signed-off-by: Mike Frysinger --- bin/etc-update | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/etc-update b/bin/etc-update index c49c4b8f6..cd63ae14b 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -551,6 +551,7 @@ usage() { Options: -d, --debug Enable shell debugging -h, --help Show help and run away + -p, --preen Automerge trivial changes only and quit -v, --verbose Show settings and such along the way -V, --version Show version and trundle away @@ -574,12 +575,14 @@ declare -i count=0 declare input=0 declare title="Gentoo's etc-update tool!" +PREEN=false SET_X=false VERBOSE=false while [[ -n $1 ]] ; do case $1 in -d|--debug) SET_X=true;; -h|--help) usage;; + -p|--preen) PREEN=true;; -v|--verbose) VERBOSE=true;; -V|--version) emerge --version; exit 0;; --automode) parse_automode_flag $2 && shift || usage 1 "Invalid mode '$2'";; @@ -674,6 +677,8 @@ fi scan +${PREEN} && exit 0 + until (( input == -1 )); do if (( count == 0 )); then die "Nothing left to do; exiting. :)" 0 -- cgit v1.2.3-1-g7c22