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:
Simon Howard 2016-02-25 21:20:38 -05:00
parent 4f5c9510c3
commit 08ef9ca39c

View file

@ -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"