From 83d18157ddfc2c1dabb3fca8918bedfb7d87420e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 2 Jun 2012 18:17:22 -0400 Subject: fix indentation and remove a few probably too verbose messages --- uninit.d/50vcs-uninit | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/uninit.d/50vcs-uninit b/uninit.d/50vcs-uninit index 165d415..803b0b5 100755 --- a/uninit.d/50vcs-uninit +++ b/uninit.d/50vcs-uninit @@ -18,19 +18,18 @@ fi managed_by_etckeeper="managed by etckeeper" if ! grep -q "$managed_by_etckeeper" "$file"; then - echo "etckeeper: "$file" does not contain \"$managed_by_etckeeper\" comment; not removing" exit 0 else realfile="$file" - if [ -n "`type -p tempfile`" ]; then - tempfile="tempfile" - elif [ -n "`type -p mktemp`" ]; then - tempfile="mktemp" - else - echo "etckeeper warning: can't find tempfile or mktemp" >&2 + if [ -n "`type -p tempfile`" ]; then + tempfile="tempfile" + elif [ -n "`type -p mktemp`" ]; then + tempfile="mktemp" + else + echo "etckeeper warning: can't find tempfile or mktemp" >&2 exit 1 - fi - file=$($tempfile) + fi + file=$($tempfile) otherentries= skipping= while read line; do @@ -47,7 +46,6 @@ else done <"$realfile" if [ "$otherentries" ]; then - echo "etckeeper: "$realfile" nonempty after \"$managed_by_etckeeper\" section removal; preserving other entries" mv -f "$file" "$realfile" else rm -f "$file" -- cgit v1.2.3