cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit cc18d10045db6465907bb2bf531926da82a9f9b6
parent 8ba85a9b48d162d1f1549f1017d94904f5f638bf
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Sat, 21 Mar 2020 13:29:56 +0200

kiss: Move error

Diffstat:
Mkiss | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git 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