blob: 98cc98ae6830fdf9ae307edf3d8ab16898808832 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh -ef
# Display a package's dependencies
## SYNOPSIS:
## .Nm
## .Op Ar pkg
## DESCRIPTION:
## .Nm
## displays the dependencies of the given
## .Em installed package .
## If no package name is given,
## .Nm
## will use the name of the current directory as the package.
## see: cpt-repodepends.1
case "$1" in
--help|-h)
printf 'usage: %s [pkg]\n' "${0##*/}"
exit 0
;;
'') set -- "${PWD##*/}"
esac
cpt-list "$1" >/dev/null
cat "$CPT_ROOT/var/db/cpt/installed/$1/depends" 2>/dev/null ||:
|