From: Mike Frysinger Date: Sun, 11 Mar 2012 02:54:59 +0000 (-0500) Subject: etc-update: add a --preen flag X-Git-Tag: v2.2.0_alpha91~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b3f235988b45c3c11d57fedad12587b1536fdac;p=portage.git etc-update: add a --preen flag 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 --- 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 diff --git a/man/etc-update.1 b/man/etc-update.1 index 85d102d92..366e8500b 100644 --- a/man/etc-update.1 +++ b/man/etc-update.1 @@ -27,9 +27,12 @@ for finding the aforementioned config protect variables. .BR \-d ", " \-\-debug Run with shell tracing enabled. .TP -.BR \h ", " \-\-help +.BR \-h ", " \-\-help Surprisingly, show the help output. .TP +.BR \-p ", " \-\-preen +Automerge trivial changes only and quit. +.TP .BR \-v ", " \-\-verbose Show settings and important decision info while running. .TP