+# set file from pkgid
+# CR- 110 set file from pkgid, create if needed
+# -R- 010 set file from pkgid, create in file, error if no file
+if [ -z "$pkgfile" ]; then
+ pkgfile="$pkgid.zpm"
+fi
+
+# will now be one of these
+# CRF 111 create package in file given, create file if needed
+# -RF 011 create package in file, error if file doesn't exist
+if [ ! -f "$pkgfile" ]; then
+ if [ $create -eq 1 ]; then
+ zpm init $pkgfile
+ else
+ die $pkgfile does not exist
+ fi
+fi
+
+set -e
+