forked from kiss-community/repo
puke: Remove potential variable overlap
This commit is contained in:
parent
944611d491
commit
7525f6ff8f
14
puke
14
puke
@ -151,21 +151,21 @@ pkg_remove() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pkg_updates() {
|
pkg_updates() {
|
||||||
for pkg in "$sys_dir/$dbs_dir/"*; do
|
for item in "$sys_dir/$dbs_dir/"*; do
|
||||||
read -r db_ver db_rel < "$pkg/version"
|
read -r db_ver db_rel < "$item/version"
|
||||||
read -r re_ver re_rel < "$rep_dir/${pkg##*/}/version"
|
read -r re_ver re_rel < "$rep_dir/${item##*/}/version"
|
||||||
|
|
||||||
[ "$db_ver-$db_rel" != "$re_ver-$re_rel" ] &&
|
[ "$db_ver-$db_rel" != "$re_ver-$re_rel" ] &&
|
||||||
printf '%s\n' "${pkg##*/} $re_ver-$re_rel"
|
printf '%s\n' "${item##*/} $re_ver-$re_rel"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_list() {
|
pkg_list() {
|
||||||
[ "$1" ] && { [ -d "$sys_dir/$dbs_dir/$1" ]; return "$?"; }
|
[ "$1" ] && { [ -d "$sys_dir/$dbs_dir/$1" ]; return "$?"; }
|
||||||
|
|
||||||
for pkg in "$sys_dir/$dbs_dir/"*; do
|
for item in "$sys_dir/$dbs_dir/"*; do
|
||||||
read -r version release < "$pkg/version"
|
read -r version release < "$item/version"
|
||||||
printf '%s\n' "${pkg##*/} $version-$release"
|
printf '%s\n' "${item##*/} $version-$release"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user