pkgfs.sh: add a new target 'listfiles'.
This target lists the files (sorted) installed by a package. Please note that package must be available in destdir and that you must specify pkgname-version as argument. --HG-- extra : convert_revision : 0e9010a41e4cb658403bc21226bf985fe21b8907
This commit is contained in:
parent
aa35ce692a
commit
6a5e9b27c8
26
pkgfs.sh
26
pkgfs.sh
|
@ -100,6 +100,7 @@ Targets:
|
||||||
install Same than \`install-destdir´ but also stows package.
|
install Same than \`install-destdir´ but also stows package.
|
||||||
list Lists all currently \`stowned´ packages.
|
list Lists all currently \`stowned´ packages.
|
||||||
remove Remove package completely (unstow + remove data)
|
remove Remove package completely (unstow + remove data)
|
||||||
|
listfiles Lists files installed from <package_name>.
|
||||||
stow Create links in master directory.
|
stow Create links in master directory.
|
||||||
unstow Remove links in master directory.
|
unstow Remove links in master directory.
|
||||||
|
|
||||||
|
@ -1180,6 +1181,28 @@ list_pkgs()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Lists files installed by a package.
|
||||||
|
#
|
||||||
|
list_pkg_files()
|
||||||
|
{
|
||||||
|
local pkg="$1"
|
||||||
|
|
||||||
|
if [ -z $pkg ]; then
|
||||||
|
echo "*** ERROR: unexistent package, aborting ***"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$PKGFS_DESTDIR/$pkg" ]; then
|
||||||
|
echo "*** ERROR: cannot find \`$pkg' in $PKGFS_DESTDIR ***"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for f in $($find_cmd $PKGFS_DESTDIR/$pkg -type f -print | sort -u); do
|
||||||
|
echo "${f##$PKGFS_DESTDIR/$pkg/}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Removes a currently installed package (unstow + removed from destdir).
|
# Removes a currently installed package (unstow + removed from destdir).
|
||||||
#
|
#
|
||||||
|
@ -1414,6 +1437,9 @@ install)
|
||||||
list)
|
list)
|
||||||
list_pkgs
|
list_pkgs
|
||||||
;;
|
;;
|
||||||
|
listfiles)
|
||||||
|
list_pkg_files $2
|
||||||
|
;;
|
||||||
remove)
|
remove)
|
||||||
remove_pkg $2
|
remove_pkg $2
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue