summaryrefslogtreecommitdiffstats
path: root/bin/etc-update
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-10 21:54:59 -0500
committerMike Frysinger <vapier@gentoo.org>2012-03-10 21:54:59 -0500
commit2b3f235988b45c3c11d57fedad12587b1536fdac (patch)
tree5fdae247aeae6fb6c29733cc9a0c9a1736ddaa8c /bin/etc-update
parent188aedeb2822f5c86a0586fd3350800565da5c6c (diff)
downloadportage-2b3f235988b45c3c11d57fedad12587b1536fdac.tar.gz
portage-2b3f235988b45c3c11d57fedad12587b1536fdac.tar.bz2
portage-2b3f235988b45c3c11d57fedad12587b1536fdac.zip
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 <iperez@babel.ls.fi.upm.es> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'bin/etc-update')
-rwxr-xr-xbin/etc-update5
1 files changed, 5 insertions, 0 deletions
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