forked from kiss-community/kiss
kiss: remove subshell use of pkg_list
This commit is contained in:
parent
854a04520d
commit
6e115ed164
16
kiss
16
kiss
@ -155,7 +155,7 @@ pkg_find() {
|
||||
printf '%s\n' "$@"
|
||||
}
|
||||
|
||||
pkg_list() (
|
||||
pkg_list() {
|
||||
cd "$sys_db"
|
||||
|
||||
# If no arguments are passed, list all.
|
||||
@ -164,17 +164,19 @@ pkg_list() (
|
||||
set -f -- *
|
||||
}
|
||||
|
||||
for pkg do
|
||||
[ -d "$pkg" ] || {
|
||||
log "$pkg" "not installed"
|
||||
for _pkg do
|
||||
[ -d "$_pkg" ] || {
|
||||
log "$_pkg" "not installed"
|
||||
return 1
|
||||
}
|
||||
|
||||
read -r version 2>/dev/null < "$pkg/version" || version=null
|
||||
read -r version 2>/dev/null < "$_pkg/version" || version=null
|
||||
|
||||
printf '%s\n' "$pkg $version"
|
||||
printf '%s\n' "$_pkg $version"
|
||||
done
|
||||
)
|
||||
|
||||
cd "$OLDPWD"
|
||||
}
|
||||
|
||||
pkg_cache() {
|
||||
# Find the tarball of a package using a glob. Use the first found match
|
||||
|
Loading…
Reference in New Issue
Block a user