aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-09-14 04:48:57 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-09-14 04:48:57 +0000
commit500787e3f90ad0251428250dd0b8680c64d39b31 (patch)
treeac3e2fc675b6c43cf1daa704ca3fae85c99002f1 /kiss
parentd967959213347855c7f36bb9aa1b78d307e1e490 (diff)
downloadcpt-500787e3f90ad0251428250dd0b8680c64d39b31.tar.gz
kiss: simpler install checks
FossilOrigin-Name: 255a8353908ca17fe53d61bd8157204aca319ef7e6c6f677a6cf5ef8904b6753
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss22
1 files changed, 7 insertions, 15 deletions
diff --git a/kiss b/kiss
index 98f1776..0a55fb5 100755
--- a/kiss
+++ b/kiss
@@ -397,32 +397,24 @@ pkg_build() {
# Install any pre-built dependencies if they exist in the binary
# directory and are up to date.
for pkg; do
- # Don't check for a pre-built package if it was passed to KISS
- # directly.
- contains "$explicit_build" "$pkg" && {
- shift
- set -- "$@" "$pkg"
- continue
- }
+ # Don't check for a pre-built package if it was passed
+ # to KISS directly.
+ contains "$explicit_build" "$pkg" && continue
# Figure out the version and release.
read -r version release < "$(pkg_find "$pkg")/version"
- # Remove the current package from the package list.
- shift
-
# Install any pre-built binaries if they exist.
# This calls 'args' to inherit a root check and call
# to 'sudo' to elevate permissions.
[ -f "$bin_dir/$pkg#$version-$release.tar.gz" ] && {
log "[$pkg] Found pre-built binary, installing"
args i "$bin_dir/$pkg#$version-$release.tar.gz"
- continue
- }
- # Add the removed package back to the list if it doesn't
- # have a pre-built binary.
- set -- "$@" "$pkg"
+ # Remove the now installed package from the build
+ # list. No better way than using 'sed' in POSIX 'sh'.
+ set -- $(echo " $* " | sed "s/ $pkg / /")
+ }
done
for pkg; do pkg_lint "$pkg"; done