mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-09-28 12:22:39 -06:00
kiss: Drop pop()
This commit is contained in:
parent
a08b796f79
commit
d0a45c4437
19
kiss
19
kiss
@ -66,15 +66,6 @@ esc() {
|
|||||||
"$(printf %s "$2" | sed 's/[\/&]/\\&/g')"
|
"$(printf %s "$2" | sed 's/[\/&]/\\&/g')"
|
||||||
}
|
}
|
||||||
|
|
||||||
pop() {
|
|
||||||
# Remove an item from a "string list". This allows us
|
|
||||||
# to remove a 'sed' call and reuse this code throughout.
|
|
||||||
del=$1
|
|
||||||
shift 2
|
|
||||||
|
|
||||||
for i do [ "$i" = "$del" ] || printf %s " $i "; done
|
|
||||||
}
|
|
||||||
|
|
||||||
_tar() {
|
_tar() {
|
||||||
# Some tar implementations support '-args' and some
|
# Some tar implementations support '-args' and some
|
||||||
# simply support 'args'. This will try '-args' and
|
# simply support 'args'. This will try '-args' and
|
||||||
@ -656,10 +647,10 @@ pkg_build() {
|
|||||||
# If an explicit package is a dependency of another explicit package,
|
# If an explicit package is a dependency of another explicit package,
|
||||||
# remove it from the explicit list as it needs to be installed as a
|
# remove it from the explicit list as it needs to be installed as a
|
||||||
# dependency.
|
# dependency.
|
||||||
# shellcheck disable=2086
|
for pkg do contains "$deps" "$pkg" ||
|
||||||
for pkg do contains "$deps" "$pkg" &&
|
explicit2=" $explicit2 $pkg "
|
||||||
explicit=$(pop "$pkg" from $explicit)
|
|
||||||
done
|
done
|
||||||
|
explicit=$explicit2
|
||||||
|
|
||||||
# See [1] at top of script.
|
# See [1] at top of script.
|
||||||
# shellcheck disable=2046,2086
|
# shellcheck disable=2046,2086
|
||||||
@ -681,9 +672,7 @@ pkg_build() {
|
|||||||
(KISS_FORCE=1 args i "$tar_file")
|
(KISS_FORCE=1 args i "$tar_file")
|
||||||
|
|
||||||
# Remove the now installed package from the build list.
|
# Remove the now installed package from the build list.
|
||||||
# See [1] at top of script.
|
shift
|
||||||
# shellcheck disable=2046,2086
|
|
||||||
set -- $(pop "$pkg" from "$@")
|
|
||||||
} done
|
} done
|
||||||
|
|
||||||
for pkg do pkg_sources "$pkg"; done
|
for pkg do pkg_sources "$pkg"; done
|
||||||
|
Loading…
Reference in New Issue
Block a user