No longer need to specify version for 'listfiles' target.
While here improve previous commit too. --HG-- extra : convert_revision : 435009e7dc55d74f08cc57fc6f78deea0fcb3f39
This commit is contained in:
parent
c4be9a5aba
commit
ecad518a07
1 changed files with 8 additions and 3 deletions
11
xbps.sh
11
xbps.sh
|
@ -1260,15 +1260,18 @@ install_pkg()
|
|||
list_pkg_files()
|
||||
{
|
||||
local pkg="$1"
|
||||
local f="$XBPS_DESTDIR/$pkg/.xbps-filelist"
|
||||
local ver=
|
||||
|
||||
[ -z $pkg ] && msg_error "unexistent package, aborting."
|
||||
|
||||
if [ ! -d "$XBPS_DESTDIR/$pkg" ]; then
|
||||
ver=$($XBPS_PKGDB_CMD version $pkg)
|
||||
[ -z "$ver" ] && msg_error "$pkg is not installed."
|
||||
|
||||
if [ ! -d "$XBPS_DESTDIR/$pkg-$ver" ]; then
|
||||
msg_error "cannot find $pkg in $XBPS_DESTDIR."
|
||||
fi
|
||||
|
||||
cat $f|sort -u
|
||||
cat $XBPS_DESTDIR/$pkg-$ver/.xbps-filelist|sort -u
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -1298,6 +1301,8 @@ remove_pkg()
|
|||
fi
|
||||
|
||||
ver=$($XBPS_PKGDB_CMD version $pkg)
|
||||
[ -z "$ver" ] && msg_error "$pkg is not installed."
|
||||
|
||||
if [ ! -d "$XBPS_DESTDIR/$pkg-$ver" ]; then
|
||||
msg_error "cannot find package on $XBPS_DESTDIR."
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue