2023-03-19 16:00:37 -04:00
|
|
|
#!/bin/bash
|
2023-06-17 07:24:35 -04:00
|
|
|
#
|
|
|
|
# This script has been created as part of the Blueprint source code
|
|
|
|
# and may be intergrated directly into the core in the future.
|
2023-03-19 16:00:37 -04:00
|
|
|
|
2023-10-31 10:47:28 -04:00
|
|
|
FLDR=$BLUEPRINT__FOLDER"/.blueprint/data/internal/db/database"
|
2023-05-09 11:59:12 -04:00
|
|
|
|
2023-03-19 16:00:37 -04:00
|
|
|
dbAdd() {
|
|
|
|
# dbAdd "database.record";
|
2023-11-01 08:44:24 -04:00
|
|
|
sed -i "s/+ db.addnewrecord;/* ${1};+ db.addnewrecord;/g" $FLDR > /dev/null;
|
2023-04-02 20:51:44 -04:00
|
|
|
}; dbValidate() {
|
2023-03-19 16:00:37 -04:00
|
|
|
# dbValidate "database.record";
|
2023-05-09 12:06:44 -04:00
|
|
|
grep -Fxq "* ${1};" $FLDR > /dev/null;
|
2023-04-02 20:51:44 -04:00
|
|
|
}; dbRemove() {
|
2023-03-19 16:00:37 -04:00
|
|
|
# dbRemove "database.record";
|
2023-05-09 12:06:44 -04:00
|
|
|
sed -i "s/* ${1};//g" $FLDR > /dev/null;
|
2023-06-17 07:24:35 -04:00
|
|
|
};
|