forked from kiss-community/kiss
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
|
#!/bin/sh -ef
|
||||||
# Display a package's dependencies
|
# Display a package's dependencies
|
||||||
|
|
||||||
# Use the current directory as the package name if no package is given.
|
kiss list "${1:-"${PWD##*/}"}" >/dev/null || {
|
||||||
[ "$1" ] || {
|
printf 'usage: kiss-depends [pkg]\n' >&2
|
||||||
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'
|
|
||||||
exit 1
|
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