#!/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 "$@"