add 8 error code sqlite for script

This commit is contained in:
2022-09-07 19:03:28 -06:00
parent c379d3b3ad
commit 8a78ad7d06

View File

@@ -46,6 +46,7 @@ function insert_post() {
local status="$?"
[ "$status" = "0" ] && echo "Inserted $slug successfully." && return
[ "$status" = "8" ] && echo "The database is read restricted, did you run the program as the correct user?" && exit 1
[ "$status" = "19" ] && echo "Post $slug already exists." && update_post "$date" "$slug" "$title" "$content"
}