kiss: combine case statements

This commit is contained in:
Dylan Araps 2020-10-03 11:18:02 +03:00
parent a9e2f78f4a
commit 5ca064ae1f
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 7 additions and 11 deletions

10
kiss
View File

@ -381,20 +381,16 @@ pkg_depends() {
# Recurse through the dependencies of the child packages. # Recurse through the dependencies of the child packages.
[ -f "$repo_dir/depends" ] && [ -f "$repo_dir/depends" ] &&
while read -r dep _ || [ "$dep" ]; do while read -r dep _ || [ "$dep" ]; do
case $dep in case $dep-$2 in
[!#]*) [!#]*-filter)
case $2 in
filter)
pkg_depends "$dep" "$2" pkg_depends "$dep" "$2"
;; ;;
*) [!#]*)
pkg_list "$dep" >/dev/null 2>&1 || pkg_list "$dep" >/dev/null 2>&1 ||
pkg_depends "$dep" pkg_depends "$dep"
;; ;;
esac esac
;;
esac
done < "$repo_dir/depends" done < "$repo_dir/depends"
# After child dependencies are added to the list, # After child dependencies are added to the list,