diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-06-14 14:34:02 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-06-14 14:34:02 +0000 |
commit | 6f4cc8351403df59a3df3702376f459700259bd0 (patch) | |
tree | 51c4fb3a3d3d3262a5ef42848553b5687603f5aa /kiss | |
parent | 2392fdf0a967a2ff75c584e6b5ee4ebe7f6e1d0d (diff) | |
download | cpt-6f4cc8351403df59a3df3702376f459700259bd0.tar.gz |
kiss: Added more error handling.
FossilOrigin-Name: 4a9823883939bbe54b75e02fe1e19703552550a4651b287d4ce3473c8204bcea
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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}" \ |