Skip to content
Snippets Groups Projects
Commit c4ea9cf8 authored by Brandon Rodriguez's avatar Brandon Rodriguez
Browse files

Add database setup command

Note that database setup is more complicated and handled in a
completely separate script.

This just downloads the corresponding script and then runs that.
parent 00858802
Branches
No related merge requests found
src/database_setup/
...@@ -9,7 +9,7 @@ set -e ...@@ -9,7 +9,7 @@ set -e
# Import utility script. # Import utility script.
source $(dirname $0)/src/utils.sh source $(dirname ${0})/src/utils.sh
### ###
...@@ -57,6 +57,28 @@ function main () { ...@@ -57,6 +57,28 @@ function main () {
echo -e "${text_blue}This may ask for your system password.${text_reset}" echo -e "${text_blue}This may ask for your system password.${text_reset}"
get_user_confirmation "${text_blue}This will also trigger a general system update. Is this okay?${text_reset}" get_user_confirmation "${text_blue}This will also trigger a general system update. Is this okay?${text_reset}"
if [[ ${return_value} == true ]]
then
# Check if dir exists. Purge if so.
if [[ -d "./database_setup" ]]
then
sudo rm -r ./database_setup
fi
# Clone relevant script to local machine.
git clone https://git.brandon-rodriguez.com/scripts/bash/database_setup.git
./database_setup/run.sh
echo ""
echo -e "${text_blue}Local database installed and setup."
echo ""
else
echo ""
echo -e "${text_blue}Cancelling local database setup."
echo ""
fi
elif [[ "${user_input}" == "3" ]] elif [[ "${user_input}" == "3" ]]
then then
# Install/Update Npm & NodeJs. # Install/Update Npm & NodeJs.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment