Fix show & info

This commit is contained in:
zawz 2020-05-22 16:19:48 +02:00
parent 59485e7970
commit ea5e2042da
3 changed files with 4 additions and 3 deletions

View file

@ -47,7 +47,7 @@ deps)
resolve_deps $* || exit $?
fi
;;
show)
info)
if [ -z "$2" ]
then
echo "No package specified" >&2

View file

@ -10,8 +10,9 @@ Operations:
install <pkg...> Install packages
remove <pkg...> Remove packages
fetch <pkg...> Fetch packages into current directory
show <pkg...> Show package files
deps <pkg...> Show dependencies of package
show <pkg...> Show package files
info <pkg...> Show info of package
list List currently installed packages
list-all List all packages in repository
list-outdated List outdated packages

View file

@ -53,7 +53,7 @@ is_installed()
# $1 = file
view_package_file() {
tree=$(tar -tJf "$1" 2>/dev/null) || exit $?
echo "$tree" | sed "s|^ROOT/|/|g ; /\/$/d ; s|^HOME/|$HOME/|g ; /^DEPS/d" 2>/dev/null
echo "$tree" | sed "s|^ROOT/|/|g ; /\/$/d ; s|^HOME/|$HOME/|g ; /^DEPS/d ; /^DESC/d" 2>/dev/null
}
# $1 = package name