diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-03 13:55:45 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-03 13:55:45 +1200 |
commit | d4cd59be2b35ae2ea39e3f0f02ee39d2a9a76fba (patch) | |
tree | c6881440921aa7e44e30625592244a384f87e116 /bin | |
parent | Correction and error catching for cfr(1df) (diff) | |
download | dotfiles-d4cd59be2b35ae2ea39e3f0f02ee39d2a9a76fba.tar.gz dotfiles-d4cd59be2b35ae2ea39e3f0f02ee39d2a9a76fba.zip |
Add error conditions to cfr(1)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cfr | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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}" |