mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-26 23:42:57 +02:00
xbps-src: less forking in get_subpkgs and unset_package_funcs
This commit is contained in:
parent
f1ec7fac9f
commit
dd9c7a967e
1 changed files with 13 additions and 10 deletions
|
@ -258,21 +258,24 @@ run_pkg_hooks() {
|
||||||
unset_package_funcs() {
|
unset_package_funcs() {
|
||||||
local f
|
local f
|
||||||
|
|
||||||
for f in $(typeset -F|grep -E '_package$'); do
|
for f in "$(typeset -F)"; do
|
||||||
eval unset -f $f
|
case "$f" in
|
||||||
|
*_package)
|
||||||
|
unset -f "$f"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
get_subpkgs() {
|
get_subpkgs() {
|
||||||
local args list
|
local f
|
||||||
|
|
||||||
args="$(typeset -F|grep -E '_package$')"
|
for f in $(typeset -F); do
|
||||||
set -- ${args}
|
case "$f" in
|
||||||
while [ $# -gt 0 ]; do
|
*_package)
|
||||||
list+=" ${3%_package}"; shift 3
|
echo "${f%_package}"
|
||||||
done
|
;;
|
||||||
for f in ${list}; do
|
esac
|
||||||
echo "$f"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue