peliprint/blueprint/lib/db.sh
Jack G 682377ac52 Fixing installer bug.
Fixing some bugs that caused the installer to not work
2023-04-03 01:21:34 +01:00

16 lines
408 B
Bash

#!/bin/bash
dbAdd() {
# dbAdd "database.record";
sed -i "s/+ db.addnewrecord;/&\n* ${1};/" /var/www/pterodactyl/.blueprint/db.md > /dev/null
}
dbValidate() {
# dbValidate "database.record";
grep -Fxq "* ${1};" /var/www/pterodactyl/.blueprint/db.md > /dev/null
}
dbRemove() {
# dbRemove "database.record";
sed -i "/^\\* ${1};$/d" /var/www/pterodactyl/.blueprint/db.md > /dev/null
}