diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-06-15 06:19:19 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-06-15 06:19:19 +0000 |
commit | 3fe6f27b34b8a391dd99d2faa67ec30067cd98ec (patch) | |
tree | 1e876a4b53a8e29201237e43109d3803d17afcbb | |
parent | a33be594b6e896ca319abd265d07b9341ae748c9 (diff) | |
download | cpt-3fe6f27b34b8a391dd99d2faa67ec30067cd98ec.tar.gz |
depends: Add make depends.
FossilOrigin-Name: 2cc7e7b4863dc721e7b2b2ee35ff4cf0c91c53d759d7a085870ee3365e3342bc
-rwxr-xr-x | kiss | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -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 ;; |