From: Ian Kelling Date: Wed, 24 Aug 2016 06:43:18 +0000 (-0700) Subject: make log-once be script instead of function X-Git-Url: https://iankelling.org/git/?p=log-quiet;a=commitdiff_plain;h=8e2977d8ed9a02302be6481f1a3ac22d7ff23e5a;ds=sidebyside make log-once be script instead of function --- diff --git a/log-once-function b/log-once old mode 100644 new mode 100755 similarity index 98% rename from log-once-function rename to log-once index abbec8b..f8938c8 --- a/log-once-function +++ b/log-once @@ -90,11 +90,13 @@ state in the same directory. $out $file <<<"${output[@]}" $out $file fi - exit 1 + return 1 elif [[ -f $c$errors ]]; then echo "log-once success after failure for $c" rm -f $c$errors else rm -f $c[0-9]* # assuming no one is putting crazy files names, as this is not exact fi + return 0 } +log-once "$@"