summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-06-29 16:07:32 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-06-29 16:07:32 +0200
commit99f4d7b40794107bae0ba4c1b9e8241cd5a98be7 (patch)
tree373deb0da0525cd66b173afd8392ef59940e42d1
parent7975548c6d9a29995b75fc186ccd62e08e6b03a3 (diff)
bin/pkg: pkg_info: Show info even if the package ain't installed
-rwxr-xr-xbin/pkg44
1 files changed, 23 insertions, 21 deletions
diff --git a/bin/pkg b/bin/pkg
index 702b532..b96ffea 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -442,33 +442,35 @@ pkg_status_wrapper () {
# Various information related to a package
pkg_info () {
- check_installed "$1"
- cd $PDIR/$1
+ cd $PDIR
# Fetch the infos
NAME="$1"
- if ([ -r priority ]) {
- PRIORITY=$(cat priority)
- PRIORITY_NAME=$(real_priority "$PRIORITY")
- }
LOCAL_VERSION=$(lst_local_version $1)
REMOTE_VERSION=$(lst_remote_version $1)
REPO_TYPE=$(lst_type $1)
- if ([ -r dependencies ]) {
- DEPENDENCIES=$(cat dependencies | tr "\n" " " | sed 's/ /, /g' | sed 's/, $//')
- }
- if ([ -r tags ]) {
- TAGS=$(cat tags | tr "\n" " " | sed 's/ /, /g' | sed 's/, $//')
- }
- if ([ -d hooks ]) {
- HOOKS=$(ls hooks)
- }
- if ([ -r Makefile ]) {
- MAKEFILE=1
- }
- SIZE=$(du -sh .$(lst_type $1) | grep -o '.*[KMG]')
- if ([ -r description ]) {
- DESCRIPTION=$(cat description)
+ if ([ -d $1 ]) {
+ cd $1
+ if ([ -r priority ]) {
+ PRIORITY=$(cat priority)
+ PRIORITY_NAME=$(real_priority "$PRIORITY")
+ }
+ if ([ -r dependencies ]) {
+ DEPENDENCIES=$(cat dependencies | tr "\n" " " | sed 's/ /, /g' | sed 's/, $//')
+ }
+ if ([ -r tags ]) {
+ TAGS=$(cat tags | tr "\n" " " | sed 's/ /, /g' | sed 's/, $//')
+ }
+ if ([ -d hooks ]) {
+ HOOKS=$(ls hooks)
+ }
+ if ([ -r Makefile ]) {
+ MAKEFILE=1
+ }
+ SIZE=$(du -sh .$(lst_type $1) | grep -o '.*[KMG]')
+ if ([ -r description ]) {
+ DESCRIPTION=$(cat description)
+ }
}
show_info () {