cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 35edb789e5d85dca059883d6a56c5f460eb26683
parent 68164c4d6779465529569534a9d1661fe87e3dd5
Author: Cem Keylan <cem@ckyln.com>
Date:   Sat,  4 Apr 2020 20:09:55 +0300

kiss-owns: meaningful output if arg is a directory

Diffstat:
Mcontrib/kiss-owns | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 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 }