diff options
author | merakor <cem@ckyln.com> | 2020-04-04 17:09:55 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-04-04 17:09:55 +0000 |
commit | 30000558407f29b4fde3c6780bbd91b01987ad3c (patch) | |
tree | a32ff882edbe7b0d7e924aabe272f11f189454d3 /contrib/kiss-owns | |
parent | c84c69309602a351a384c9896b9b31508520e627 (diff) | |
download | cpt-30000558407f29b4fde3c6780bbd91b01987ad3c.tar.gz |
kiss-owns: meaningful output if arg is a directory
FossilOrigin-Name: 07484c8f6786df7a8163e913a69acfefd4f64b66053bb7ad934d29a7a790b6ca
Diffstat (limited to 'contrib/kiss-owns')
-rwxr-xr-x | contrib/kiss-owns | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/kiss-owns b/contrib/kiss-owns index 249c52c..1ab7c55 100755 --- a/contrib/kiss-owns +++ b/contrib/kiss-owns @@ -8,7 +8,9 @@ file=$(readlink -f "$KISS_ROOT/${1##$KISS_ROOT}") # Check if the file exists and exit if it is not. [ -f "$file" ] || { - printf '%s\n' "error: file '$1' doesn't exist." >&2 + [ -d "$file" ] && printf '%s\n' \ + "error: please specify a file instead of a directory" >&2 || + printf '%s\n' "error: file '$1' doesn't exist." >&2 exit 1 } |