mirror of
https://github.com/chocolate-doom/chocpkg.git
synced 2024-11-10 07:11:39 +00:00
Output 'chocpkg info' all at once.
Generating the output can be slow, so gather the whole output and write it at once.
This commit is contained in:
parent
4f5c9510c3
commit
08ef9ca39c
1 changed files with 15 additions and 12 deletions
|
@ -180,18 +180,7 @@ cmd_packages() {
|
|||
done
|
||||
}
|
||||
|
||||
cmd_info() {
|
||||
# If a specific package name is not provided, list info on
|
||||
# all packages.
|
||||
if [ $# -lt 2 ]; then
|
||||
for package in $(chocpkg packages); do
|
||||
chocpkg info "$package"
|
||||
echo
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
configure_for_package "$2"
|
||||
package_info() {
|
||||
printf "package: %s\n" "$PACKAGE_NAME"
|
||||
printf "description: %s\n" "$PACKAGE_DESCRIPTION"
|
||||
printf "type: %s\n" "$PACKAGE_TYPE"
|
||||
|
@ -211,6 +200,20 @@ cmd_info() {
|
|||
printf "\n"
|
||||
}
|
||||
|
||||
cmd_info() {
|
||||
# If a specific package name is not provided, list info on
|
||||
# all packages.
|
||||
if [ $# -lt 2 ]; then
|
||||
for package in $(chocpkg packages); do
|
||||
chocpkg info "$package"
|
||||
echo
|
||||
done
|
||||
else
|
||||
configure_for_package "$2"
|
||||
echo "$(package_info)"
|
||||
fi
|
||||
}
|
||||
|
||||
cmd_dependencies() {
|
||||
for dep in $DEPENDENCIES; do
|
||||
echo "$dep"
|
||||
|
|
Loading…
Reference in a new issue