build: Create the custom settings file if it doesn't already exist

This commit is contained in:
Starbeamrainbowlabs 2019-03-07 18:33:20 +00:00
parent 527738fa00
commit 74d8d6ee87
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 12 additions and 0 deletions

12
build
View File

@ -86,6 +86,18 @@ function task_setup {
composer install --no-dev;
task_end $?;
if [ ! -d "./data" ]; then
task_begin "Setting up initial data folder";
mkdir "./data"; chmod 0700 "./data";
echo -e "# -------[ Custom Settings File - Last updated $(date) ]-------" >"./data/settings.toml";
echo -e '[database]\nusername = "INSERT_DATABASE_USERNAME_HERE"\npassword = "INSERT_DATABASE_PASSWORD_HERE";' >>"./data/settings.toml";
echo -e "${HC}Don't forget to edit './data/settings.toml' to specify the database username and password${RS}";
task_end $?;
fi
stage_end $?;
}