-# cases R = full package id, F = specified package file
-
-# immediate error
-# -- 00 error, must specify something
-if [ -z "$release" ] && [ -z "$pkgfile" ]; then
- die must specify package file or complete package id
-fi
-
-# TODO look in package file
-# -F 01 error, wouldn't know which pkgid to create, could derive from file?
-if [ -z "$release" ]; then
- # must have package file, or would have died above
- pkgid=$(zpm findpkg -f $pkgfile $pkgid)
- if [ -n "$pkgid" ]; then
- eval "$(zpm parse -E $pkgid)"
- fi
+if [ $installall -eq 1 ]; then
+ pkglist="$(zpm list -f $pkgfile)"
+else
+ pkglist=$(zpm findpkg -f $pkgfile "$1")