From 21a096b6de693a1adff7ead3a1b483da2b38b3d9 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 3 Jul 2011 12:22:29 +0200 Subject: [PATCH] xbps-src: rename listfiles target to list-files. --- xbps-src/shutils/pkgtarget_funcs.sh.in | 5 ++++- xbps-src/xbps-src.sh.in | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/xbps-src/shutils/pkgtarget_funcs.sh.in b/xbps-src/shutils/pkgtarget_funcs.sh.in index e58708d05b1..fc3c1c77b56 100644 --- a/xbps-src/shutils/pkgtarget_funcs.sh.in +++ b/xbps-src/shutils/pkgtarget_funcs.sh.in @@ -181,7 +181,10 @@ list_pkg_files() [ -z $pkg ] && msg_error "unexistent package, aborting.\n" ver=$($XBPS_PKGDB_CMD version $pkg) - [ -z "$ver" ] && msg_error "$pkg is not installed.\n" + if [ -z "$ver" ]; then + msg_warn "$pkg is not installed.\n" + return 1 + fi cat $XBPS_PKGMETADIR/$pkg/flist } diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index f48633084e6..4b7880d6f4f 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -76,7 +76,7 @@ Targets: install-destdir [pkgname] build + install into destdir. install [pkgname] install-destdir + stow. list List installed packages in . - listfiles List installed files from . + list-files List installed files from . make-repoidx Build a package index for the local repository associated with the master directory or , or updates it. @@ -380,12 +380,12 @@ install|install-destdir) install_pkg $pkgname fi ;; -list|listfiles) +list|list-files) if [ "$target" = "list" ]; then $XBPS_BIN_CMD list - exit $? + else + list_pkg_files $2 fi - list_pkg_files $2 ;; make-repoidx) if [ -n "${_PACKAGEDIR}" ]; then