+# TODO what's the difference between prefix and pkgroot
+# need an option to not chown the files
+# option to install but not merge/track
+
+# options
+# -R install root, if installing as root, will chroot?
+# -C no chroot, even if root
+# -N no pre-scripts
+# -X no post-scripts
+# -f source repository file
+# -d local (recording) repository database
+# -D don't locally record
+# -t only files matching tags
+# -T exclude files matching tags
+
+chroot=1
+
+for cf in /etc/zpmrc ~/.zpmrc ./.zpmrc; do
+ test -r $cf && . $cf
+done
+
+while getopts :R:CNXf:d:Dt:T:u:g: opt; do