aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-03-22 16:31:13 +0000
committermerakor <cem@ckyln.com>2020-03-22 16:31:13 +0000
commitad05cb004c52242891c9e52cdc51f5299a8c9e04 (patch)
treeff96540e9cae38395f121847ce4c86c2918c7d9f /kiss
parentddfe76bf2c621c254ff9271b10a176ea6f0511d5 (diff)
downloadcpt-ad05cb004c52242891c9e52cdc51f5299a8c9e04.tar.gz
kiss: Move error
FossilOrigin-Name: 5a199ec51938135eddaa9220dd71311df22ced5081a478d96b0ec62d20756e29
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss11
1 files changed, 5 insertions, 6 deletions
diff --git a/kiss b/kiss
index d2144eb..e0a61c8 100755
--- a/kiss
+++ b/kiss
@@ -118,12 +118,7 @@ pkg_find() {
# Figure out which repository a package belongs to by
# searching for directories matching the package name
# in $KISS_PATH/*.
- [ "$KISS_PATH" ] || die "\$KISS_PATH needs to be set"
-
- # Turn the argument list into variables as we reset
- # the list below.
- query=$1
- match=$2
+ query=$1 match=$2
# This ugly mess appends '/.' to the end of each path in
# '$KISS_PATH' as POSIX 'find' has no '-mindepth'/'-maxdepth'.
@@ -1353,6 +1348,10 @@ args() {
}
main() {
+ # Die here if the user has no set KISS_PATH. This is a rare occurance
+ # as the environment variable should always be defined.
+ [ "$KISS_PATH" ] || die "\$KISS_PATH needs to be set"
+
# Set the location to the repository and package database.
pkg_db=var/db/kiss/installed