diff options
Diffstat (limited to 'trunk/src/lspkg')
-rwxr-xr-x | trunk/src/lspkg | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/trunk/src/lspkg b/trunk/src/lspkg index c60de49..167b547 100755 --- a/trunk/src/lspkg +++ b/trunk/src/lspkg @@ -17,6 +17,15 @@ # Place - Suite 330, Boston, MA 02111-1307, USA # +COMMON="/usr/libexec/simplepkg/common.sh" + +if [ -f "$COMMON" ]; then + source $COMMON +else + echo "error: file $COMMON not found, check your `basename $0` installation" + exit 1 +fi + function head_line { echo "usage: [ROOT=/otherroot] `basename $0` [option expression]" } @@ -37,14 +46,6 @@ options are: # ----------------------------------------------------- # lspkg # ----------------------------------------------------- -COMMON="/usr/libexec/simplepkg/common.sh" - -if [ -f "$COMMON" ]; then - source $COMMON -else - echo "error: file $COMMON not found, check your `basename $0` installation" - exit 1 -fi if [ $# -eq 2 ]; then LIST_PKGS="`ls /$ROOT/var/log/packages/$2-[0-9]* 2> /dev/null`" @@ -116,7 +117,9 @@ case $1 in ;; *) if [ ! -z "$LIST_PKGS" ]; then - echo "$LIST_PKGS" + for pack in $LIST_PKGS; do + echo $pack + done else if [ ! -z "$ROOT" ]; then echo "$1: package not found on /$ROOT/var/log/packages" |