aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-04-14 19:03:54 +0000
committermerakor <cem@ckyln.com>2020-04-14 19:03:54 +0000
commitd8fd929d463edc0f8d68eb76d1ce4c152b39f445 (patch)
treecb6cbcfaa653d69ef109faa349a0c6b18660ba87 /kiss
parent6b833795edb8db83b2a786cf3c8209ec95d4b87d (diff)
downloadcpt-d8fd929d463edc0f8d68eb76d1ce4c152b39f445.tar.gz
kiss: use the upper directory for KISS_PATH if no argument is specified
FossilOrigin-Name: 550011c996d5f7da3cfea6c4fadf020fbe4382eef307ee7edf258655978de47f
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss8
1 files changed, 7 insertions, 1 deletions
diff --git a/kiss b/kiss
index 9053c2c..727829c 100755
--- a/kiss
+++ b/kiss
@@ -1263,7 +1263,13 @@ args() {
case $action in
b|build|c|checksum|i|install|r|remove)
- [ "$1" ] || set -- "${PWD##*/}" ; esac
+ [ "$1" ] || {
+ # We are exporting the KISS_PATH, so if another
+ # instance of 'kiss' is spawned from the current
+ # one, they continue to use the same KISS_PATH
+ export KISS_PATH="${PWD%/*}"
+ set -- "${PWD##*/}"
+ } ; esac
# Actions can be abbreviated to their first letter. This saves
# keystrokes once you memorize the commands.