summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2021-04-26 16:37:24 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2021-04-26 16:37:24 -0400
commit524152fc68617727be4a663160de80f3ebe7cef3 (patch)
treeca627e6ba21d722baef76b5ead10937eea1674fc
parentba98862a88ba3a867945c4e8bfa5a971b8ec37f9 (diff)
downloadtmpoverlay-524152fc68617727be4a663160de80f3ebe7cef3.tar.xz
tmpoverlay-524152fc68617727be4a663160de80f3ebe7cef3.zip
properly fail on empty source
-rwxr-xr-xtmpoverlay2
1 files changed, 1 insertions, 1 deletions
diff --git a/tmpoverlay b/tmpoverlay
index 10662f5..d5e84f2 100755
--- a/tmpoverlay
+++ b/tmpoverlay
@@ -126,7 +126,7 @@ done
[ $# != 0 ] || { log 'no paths specified'; usage >&2; exit 1; }
unset lowerdir
-while [ -n "$2" ]; do
+while [ "$#" != 1 ]; do
d=$(canon "$1")
if [ -h "$d" ] || ! [ -d "$d" ]; then
die 'source "%s" is not a directory' "$d"