kiss: Added more error handling.

This commit is contained in:
Dylan Araps 2019-06-14 17:34:02 +03:00
parent 104ed34bdc
commit 27b4037961
1 changed files with 5 additions and 1 deletions

6
kiss
View File

@ -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}" \