From 4201faa159fa3f81cfd4d1dbd1e8c76e81c9adda Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 21 May 2008 18:11:07 +0200 Subject: bin/pkg: fixed some things pointed out by Zaba - Don't execute 'pkg', but use the corresponding function - print packagename on errors --- bin/pkg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/pkg b/bin/pkg index 4d81198..c1fe546 100755 --- a/bin/pkg +++ b/bin/pkg @@ -28,7 +28,7 @@ check_deps () { echo -n "$1 depends on $dep. Install dependency? [Y/n] " read if [ ! "$REPLY" = 'n' ]; then - pkg add "$dep" + pkg_add "$dep" fi fi } @@ -36,7 +36,7 @@ check_deps () { pkg_add () { if [ -d $PDIR/$1 ]; then - echo_status "Package already installed!" + echo_status "Package '$1' is already installed!" return 100 fi check_deps "$1" @@ -55,7 +55,7 @@ pkg_add () { pkg_remove () { if [ ! -d $PDIR/$1 ]; then - echo_status "Package not installed!" + echo_status "Package '$1' is not installed!" return 100 fi if [ -f $PDIR/$1/hooks/pre-remove ]; then -- cgit v1.2.3