case $opt in
f) pkgfile="$OPTARG" ;;
v) verbose=1 ;;
- m) message=$(zpm quote "$OPTARG") ;;
+ m) message="$OPTARG" ;;
esac
done
shift $(( OPTIND - 1))
if [ -z "$message" ]; then
message=null
+else
+ message=$(zpm quote -q "$message")
fi
die() {
fi
pkgid=$(zpm quote "$pkgid")
printf "delete from packages_pkgid where pkgid = '$pkgid';\n"
- printf "insert into zpmlog (action, target, info) values (%s,'%s',%s);\n" 'rmpackage' "$pkgid" "$message"
+ printf "insert into zpmlog (action, target, info) values ('rmpackage','%s',%s);\n" "$pkgid" "$message"
done
printf "commit;\n"
} | zpm shell $pkgfile