aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-09-03 13:55:45 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-09-03 13:55:45 +1200
commitd4cd59be2b35ae2ea39e3f0f02ee39d2a9a76fba (patch)
treec6881440921aa7e44e30625592244a384f87e116 /bin
parentCorrection and error catching for cfr(1df) (diff)
downloaddotfiles-d4cd59be2b35ae2ea39e3f0f02ee39d2a9a76fba.tar.gz
dotfiles-d4cd59be2b35ae2ea39e3f0f02ee39d2a9a76fba.zip
Add error conditions to cfr(1)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cfr2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/cfr b/bin/cfr
index 52a9bb2b..f5eafef5 100755
--- a/bin/cfr
+++ b/bin/cfr
@@ -3,9 +3,11 @@
for dir in "${@:-.}" ; do
if ! [ -d "$dir" ] ; then
printf >&2 'cfr: %s: Not a directory\n' "$dir"
+ ex=1
continue
fi
printf '%u\t%s\n' \
"$(find "$dir" -type d -exec cf -o -- {} \; | tot)" \
"$dir"
done
+exit "${ex:-0}"