depends: Add make depends.

This commit is contained in:
Dylan Araps 2019-06-15 09:19:20 +03:00
parent 2fe1b896f9
commit 694e4a6063
1 changed files with 10 additions and 5 deletions

15
kiss
View File

@ -41,14 +41,17 @@ pkg_setup() {
}
pkg_depends() {
while read -r dep; do
pkg_list "$dep" ||
while read -r dep opt; do
pkg_list "$dep" || {
[ "$1" = install ] && [ "$opt" = make ] && return
case $missing in
*" $dep,"*) ;;
*) missing="$missing $dep,"
*" $dep${opt:+ ($opt)},"*) ;;
*) missing="$missing $dep${opt:+ ($opt)},"
pkg_setup "$dep"
pkg_depends ;;
esac
}
done 2>/dev/null < depends
}
@ -200,7 +203,9 @@ args() {
pkg_checksum
log "Generated checksums." ;;
i*) pkg_install ;;
i*) pkg_depends install
pkg_install ;;
l*) pkg_list "$2" ;;
r*) pkg_remove || die "Package '$name' not installed" ;;
u*) pkg_updates ;;