summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 () {