blob: cbf88807846fd152c78a18863754a49a919a1ced (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh -ef
# List installed packages
if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
parser_definition() {
setup REST -- "usage: ${0##*/} [-c] [pkg...]"
msg -- '' 'Options:'
flag CURRENT -c --current -- "Use the current directory as a package"
global_options
}
eval "$(getoptions parser_definition parse "$0")"
eval "$(getoptions_help parser_definition usage)"
parse "$@"
eval set -- "$REST"
[ "$CURRENT" ] && set -- "${PWD##*/}"
pkg_list "$@"
|