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