From 838cb4b1494ab9c3cfc7c0a952aaf220625758df Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 15 Oct 2007 14:06:17 +0000 Subject: clean up verbosity --- lbu | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lbu') diff --git a/lbu b/lbu index f10caa8..783cb15 100644 --- a/lbu +++ b/lbu @@ -213,25 +213,25 @@ cmd_package() { # create tar archive [ -f "$EXCLUDE_LIST" ] && excl="-X $EXCLUDE_LIST" [ -f "$INCLUDE_LIST" ] && incl="-T $INCLUDE_LIST" - if [ -z "$ENCRYPTION" ]; then - tar $VERBOSE $excl $incl -c $currentlist \ - | gzip -c >"$tmppkg" + if [ -n "$VERBOSE" ]; then + echo "Archiving the following files:" >&2 + # we dont want to mess the tar output with the + # password prompt. Lets get the tar output first. + tar $excl $incl -c -v $currentlist > /dev/null rc=$? - else - if [ -n "$VERBOSE" ]; then - echo "Archiving the following files:" >&2 - # we dont want to mess the tar output with the - # password prompt. Lets get the tar output first. - tar $excl $incl -c -v $currentlist > /dev/null + fi + if [ $rc -eq 0 ]; then + if [ -z "$ENCRYPTION" ]; then + tar $excl $incl -c $currentlist | gzip -c >"$tmppkg" rc=$? - fi - if [ $rc -eq 0 ]; then + else tar $excl $incl -c $currentlist | gzip -c \ | $OPENSSL enc "-$ENCRYPTION" -salt > "$tmppkg" rc=$? fi fi + # actually commit unless dryrun mode if [ $rc -eq 0 ]; then [ -z "$DRYRUN" ] && cp "$tmppkg" "$pkg" else -- cgit v1.2.3