From 39a2a22d03cf87905233802b3c8c1e6586320675 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 24 May 2008 19:36:26 +0200 Subject: bin/pkg: Try being less interactive --- bin/pkg | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/pkg b/bin/pkg index cdefde8..99476a1 100755 --- a/bin/pkg +++ b/bin/pkg @@ -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 () { -- cgit v1.2.3