3 # parse command line options
4 while getopts P: opt; do
6 P) PATH=$OPTARG:$PATH ;;
7 *) printf "zpm unknown option '%s'\n" "$opt"; exit 1 ;;
12 #: ${ZPMPATH:=/usr/libexec/zpm}
14 if [ -n "$ZPMPATH" ]; then
19 [ -z "$1" ] && set help
28 # read in config files
30 test -r /etc/zpmrc && . /etc/zpmrc
31 test -r $HOME/.zpmrc && . $HOME/zpmrc
32 test -r .zpmrc && . .zpmrc
36 ecmd=$(command -v "zpm-$cmd") && { exec "$ecmd" "$@" || die "$0: unknown command zpm help"; }
37 find $(echo $PATH | tr ':' ' ') -maxdepth 1 -type f -name 'zpm-*' -executable -printf '%P\n'
40 ecmd=$(command -v "zpm-$cmd") || die "$0: unknown command $cmd $@"
41 exec "$ecmd" "$@" || die "$0: could not exec $ecmd"
47 note: add/edit a note file, - from stdin, list if none
48 ack: acknowledge a note file
51 build a package from source
52 - take file names on stdin and build package from them
53 - <name> repackage an installed package
55 install: install a package, - <name> for from a file
57 remove: remove a package
59 db: edit package databases used for finding packages
61 info: get information on a package
63 track: add a package to config tracked packages
65 add: add to a repository/database
67 clean: clean a repository/database
69 update: update a package, or all if no name