aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-14 14:34:02 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-14 14:34:02 +0000
commit6f4cc8351403df59a3df3702376f459700259bd0 (patch)
tree51c4fb3a3d3d3262a5ef42848553b5687603f5aa /kiss
parent2392fdf0a967a2ff75c584e6b5ee4ebe7f6e1d0d (diff)
downloadcpt-6f4cc8351403df59a3df3702376f459700259bd0.tar.gz
kiss: Added more error handling.
FossilOrigin-Name: 4a9823883939bbe54b75e02fe1e19703552550a4651b287d4ce3473c8204bcea
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss6
1 files changed, 5 insertions, 1 deletions
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}" \