v) verbose=1 ;;
esac
done
+shift $((OPTIND - 1))
for pkgfile in "$@"; do
-appid=$(sqlite3 $pkgfile 'pragma application_id;' | ( echo obase = 16; cat - ) | bc)
+ if [ ! -f "$pkgfile" ]; then
+ if [ "$verbose" -eq 1 ]; then
+ echo $pkgfile does not appear to be a zpm package file 1>&2
+ fi
+ exit 1
+ fi
+
+appid=$(zpm shell $pkgfile 'pragma application_id;' | ( echo obase = 16; cat - ) | bc)
if [ "$appid" != "5A504442" ]; then
if [ "$verbose" -eq 1 ]; then
echo $pkgfile does not appear to be a zpm package file 1>&2