mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-22 23:20:06 -07:00
kiss-depends: changes
- whitespace is normalized between fields. - less code.
This commit is contained in:
parent
43a2476f7e
commit
9e38bf7d03
@ -1,16 +1,11 @@
|
||||
#!/bin/sh -ef
|
||||
# Display a package's dependencies
|
||||
|
||||
# Use the current directory as the package name if no package is given.
|
||||
[ "$1" ] || {
|
||||
set -- "${PWD##*/}"
|
||||
}
|
||||
|
||||
# Ignore shellcheck as we want the warning's behavior.
|
||||
# shellcheck disable=2015
|
||||
kiss list "${1:-null}" >/dev/null || {
|
||||
printf 'usage: kiss-depends [pkg]\n'
|
||||
kiss list "${1:-"${PWD##*/}"}" >/dev/null || {
|
||||
printf 'usage: kiss-depends [pkg]\n' >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
cat "$KISS_ROOT/var/db/kiss/installed/$1/depends" 2>/dev/null
|
||||
while read -r dep mak || [ "$dep" ]; do
|
||||
printf '%s%s\n' "$dep" "${mak:+ "$mak"}"
|
||||
done 2>/dev/null < "$KISS_ROOT/var/db/kiss/installed/$1/depends"
|
||||
|
Loading…
Reference in New Issue
Block a user