#!/bin/sh
-PATH="$PATH:/usr/libexec/zpm"
+# parse command line options
+while getopts P: opt; do
+ case $opt in
+ P) PATH=$PATH:$OPTARG ;;
+ *) printf "zpm unknown option '%s'\n" "$opt"; exit 1 ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+: ${ZPMPATH:=/usr/libexec/zpm}
+
+PATH="$PATH:$ZPMPATH"
export PATH
[ -z "$1" ] && set help
exit 1;
}
-# parse command line options
-
# read in config files
test -r /etc/zpmrc && . /etc/zpmrc