From e2cf8f5cf33a975f61d7e42a7334883384dcb857 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 25 Mar 2011 18:20:34 +0100 Subject: [PATCH] ENH: foamCleanPath quick exit on empty 'path' --- bin/foamCleanPath | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/foamCleanPath b/bin/foamCleanPath index 7eae89bc34..8de977df87 100755 --- a/bin/foamCleanPath +++ b/bin/foamCleanPath @@ -52,6 +52,11 @@ options: - elements whose start matches one of the wildcard(s) - inaccessible directories (with the -strip (at your option) + Exit status + 0 on success + 1 for miscellaneous errors. + 2 initial value of 'path' is empty + USAGE exit 1 } @@ -81,6 +86,9 @@ done dirList="$1" shift +[ -n "$1" ] || exit 2 # quick exit on empty 'dirList' + + ##DEBUG echo "input>$dirList<" 1>&2 # preserve current IFS and split on colon or whitespace