From 76c3de93879afb38b0f88be131999cfa13f52cf4 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 21 Apr 2009 19:00:37 +0200 Subject: pkg: Improved some error messages --- bin/pkg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/pkg b/bin/pkg index 3269ed0..52ca92b 100755 --- a/bin/pkg +++ b/bin/pkg @@ -58,11 +58,11 @@ function say { } function check_installed { - [[ -n $1 && -d $PDIR/$1 ]] || die "Not installed: '$1'\n" + [[ -n $1 && -d $PDIR/$1 ]] || die "Package not installed: '$1'\n" } function check_valid { - list_exists $1 || die "No such package: '$1'\n" + list_exists $1 || die "Package does not exist: '$1'\n" } function clear_line { @@ -334,7 +334,7 @@ function list_update_remote { cp $tmpfile .list-remote } else { die "remote list update failed\n" \ - " -- note --\n" \ + "-- note --\n" \ "There were recent changes in pkg involving the package root\n\n" \ "You might want to copy the pkglist script ($PDIR/core/include/pkglist)\n" \ "into the package root, so that it's available as\n" \ @@ -665,7 +665,7 @@ function pkg_add { info "Package '$1' is already installed!\n" exit 1 } - list_exists $1 || die "No such package: $1\n" + check_valid $1 info "Retrieving package $1...\n" cd $PDIR || return 255 vcs_add $1 || return 255 -- cgit v1.2.3