diff options
Diffstat (limited to 'tools/cpt-remove')
-rwxr-xr-x | tools/cpt-remove | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/cpt-remove b/tools/cpt-remove index 803fd36..543f8b8 100755 --- a/tools/cpt-remove +++ b/tools/cpt-remove @@ -4,6 +4,8 @@ # shellcheck disable=1091 if command -v cpt-lib >/dev/null; then . cpt-lib; else . ../lib.sh; fi +[ "$1" ] || set -- "${PWD##*/}"; export CPT_PATH=${PWD%/*}:$CPT_PATH + while [ "$1" ]; do case "$1" in --help|-h) @@ -18,7 +20,6 @@ while [ "$1" ]; do --root) export CPT_ROOT=$2; shift 2 ;; --) break ;; -*) die "Unknown argument '$1'" ;; - '') set -- "${PWD##*/}"; export CPT_PATH=${PWD%/*}:$CPT_PATH ;; *) break ;; esac done |