mirror of
https://github.com/chocolate-doom/chocpkg.git
synced 2025-03-01 15:00:56 +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
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_info() {
|
package_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"
|
|
||||||
printf "package: %s\n" "$PACKAGE_NAME"
|
printf "package: %s\n" "$PACKAGE_NAME"
|
||||||
printf "description: %s\n" "$PACKAGE_DESCRIPTION"
|
printf "description: %s\n" "$PACKAGE_DESCRIPTION"
|
||||||
printf "type: %s\n" "$PACKAGE_TYPE"
|
printf "type: %s\n" "$PACKAGE_TYPE"
|
||||||
|
@ -211,6 +200,20 @@ cmd_info() {
|
||||||
printf "\n"
|
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() {
|
cmd_dependencies() {
|
||||||
for dep in $DEPENDENCIES; do
|
for dep in $DEPENDENCIES; do
|
||||||
echo "$dep"
|
echo "$dep"
|
||||||
|
|
Loading…
Reference in a new issue