From 6f4cc8351403df59a3df3702376f459700259bd0 Mon Sep 17 00:00:00 2001 From: "dylan.araps@gmail.com" Date: Fri, 14 Jun 2019 14:34:02 +0000 Subject: kiss: Added more error handling. FossilOrigin-Name: 4a9823883939bbe54b75e02fe1e19703552550a4651b287d4ce3473c8204bcea --- kiss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'kiss') diff --git a/kiss b/kiss index 69906b8..212bb53 100755 --- a/kiss +++ b/kiss @@ -218,7 +218,11 @@ args() { main() { trap 'rm -rf -- "$mak_dir" "$pkg_dir"' EXIT INT - [ -z "$KISS_PATH" ] && die "Set \$KISS_PATH to a repository location." + [ -z "$KISS_PATH" ] && + die "Set \$KISS_PATH to a repository location." + + [ -z "$KISS_ROOT" ] && [ "$(id -u)" != 0 ] && + die "\$KISS_ROOT is set to '/' so you must be root." mkdir -p "${cac_dir:=${XDG_CACHE_HOME:=$HOME/.cache}/${0##*/}}" \ "${src_dir:=$cac_dir/sources}" \ -- cgit v1.2.3