From 77c35536707fab0de48070cf028f7d0a3a5eeb1e Mon Sep 17 00:00:00 2001 From: merakor Date: Thu, 14 May 2020 10:37:25 +0000 Subject: kiss: make pop easier to read and understand FossilOrigin-Name: e57368410658ef7270fb518f342b4942f365572775da3d589579cf84e20160c4 --- kiss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kiss b/kiss index ecee601..9875c53 100755 --- a/kiss +++ b/kiss @@ -75,7 +75,7 @@ pop() { # Remove an item from a "string list". This allows us # to remove a 'sed' call and reuse this code throughout. del=$1 - shift + shift 2 for i do [ "$i" = "$del" ] || printf %s " $i "; done } @@ -619,7 +619,7 @@ pkg_build() { # installed as a dependency. # shellcheck disable=2086 for pkg do - contains "$deps" "$pkg" && explicit=$(pop "$pkg" $explicit) + contains "$deps" "$pkg" && explicit=$(pop "$pkg" from $explicit) done # See [1] at top of script. @@ -644,7 +644,7 @@ pkg_build() { # Remove the now installed package from the build list. # See [1] at top of script. # shellcheck disable=2046,2086 - set -- $(pop "$pkg" "$@") + set -- $(pop "$pkg" from "$@") } done for pkg do pkg_sources "$pkg"; done @@ -811,7 +811,7 @@ pkg_conflicts() { # Generate a list of all installed package manifests # and remove the current package from the list. # shellcheck disable=2046,2086 - set -- $(set +f; pop "$sys_db/$p_name/manifest" "$sys_db"/*/manifest) + set -- $(set +f; pop "$sys_db/$p_name/manifest" from "$sys_db"/*/manifest) [ -s "$KISS_TMPDIR/$pid-m" ] || return 0 -- cgit v1.2.3