summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-05-24 19:36:26 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-05-24 19:36:26 +0200
commit39a2a22d03cf87905233802b3c8c1e6586320675 (patch)
treef292b0e3c7fae1af5ca32ce6de2f1362f6270a2d
parent76ec38568c4caa2e542901d47e0d92bf5f25b7bc (diff)
bin/pkg: Try being less interactive
-rwxr-xr-xbin/pkg8
1 files changed, 7 insertions, 1 deletions
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 () {