diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-24 19:36:26 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-24 19:36:26 +0200 |
commit | 39a2a22d03cf87905233802b3c8c1e6586320675 (patch) | |
tree | f292b0e3c7fae1af5ca32ce6de2f1362f6270a2d | |
parent | 76ec38568c4caa2e542901d47e0d92bf5f25b7bc (diff) |
bin/pkg: Try being less interactive
-rwxr-xr-x | bin/pkg | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -28,6 +28,7 @@ fi check_deps () { [ -r $PDIR/$1/.deps ] || return 0 DEPS=($(cat $PDIR/$1/.deps)) + INSTALL='' for dep in $DEPS; { if [ "$dep" = "$1" ]; then error "This package depends on itself. Therefore, I'm considering it borked. Not installing." @@ -36,10 +37,15 @@ check_deps () { echo -n "$1 depends on $dep. Install dependency? [Y/n] " read if [ ! "$REPLY" = 'n' ]; then - pkg_add "$dep" + INSTALL+=" $dep" fi fi } + if [ -n "$INSTALL" ]; then + for pkg in $INSTALL; { + pkg_add "$pkg" + } + fi } pkg_add () { |