diff --git a/run.sh b/run.sh index ec467c54af256778393d22cdd0f2ce34038a0156..25df59246ad828e14047749cf0aefbca14fc52b2 100755 --- a/run.sh +++ b/run.sh @@ -21,20 +21,23 @@ function main () { # Make sure user is not root user. check_is_not_user root + # Provide program summary help. + echo "" + echo -e "${text_blue}This script provides some quick and easy setup functions for a linux install.${text_reset}" + echo -e "${text_blue}For example, it can map all the \"standard\" user folders to an external drive,${text_reset}" + echo -e "${text_blue}or install the latest version of some very common software.${text_reset}" + echo -e "${text_blue}May not work with all versions of linux.${text_reset}" + echo "" + # Run program loop. while [[ $run_script_loop == true ]] do - echo "" - echo -e "${text_blue}This script provides some quick and easy setup functions for a linux install.${text_reset}" - echo -e "${text_blue}For example, it can map all the \"standard\" user folders to an external drive,${text_reset}" - echo -e "${text_blue}or install the latest version of some very common software.${text_reset}" - echo -e "${text_blue}May not work with all versions of linux.${text_reset}" - echo "" - # Display options. echo "" echo -e "${text_blue}Select an option:${text_reset}" echo -e "${text_cyan}1${text_reset}) Initialize Git" + echo -e "${text_cyan}2${text_reset}) Setup Local Database" + echo -e "${text_cyan}3${text_reset}) Install/Update Npm & NodeJs" echo -e "${text_cyan}0${text_reset}) Exit" # Get user input. @@ -43,17 +46,34 @@ function main () { # Handle based on selected option. if [[ "${user_input}" == "1" ]] then - pwd - echo "" # Git initialization. ./initialize_git.sh + elif [[ "${user_input}" == "2" ]] + then + # Setup local database. + echo "" + echo -e "${text_blue}Sudo is required for installing/updating system files.${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}" + + elif [[ "${user_input}" == "3" ]] + then + # Install/Update Npm & NodeJs. + echo "" + echo -e "${text_blue}Sudo is required for installing/updating system files.${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}" + elif [[ "${user_input}" == "0" ]] then + # Exit program. echo "" echo -e "${text_blue}Exiting program.${text_reset}" run_script_loop=false + else + # Handle unrecognized input. echo "" echo -e "${text_red}Unrecognized selection.${text_reset}" fi