diff --git a/install.sh b/install.sh index ee696ce..17b71bf 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ function styleColor { function styleColorRst { echo -e "\e[0m" } -function styleTitle { +function displayTitle { # Arguments title=$1 @@ -34,11 +34,33 @@ function styleTitle { bars="${bars}-" done bars="${bars}+" - echo -e "\t${bars}" + echo -e "\n\n\t${bars}" echo -e "\t| $(styleColor "purple")${title}$(styleColorRst) |" - echo -e "\t${bars}" + echo -e "\t${bars}\n\n" +} +function displayQuestion { + printf>&2 "$(styleColor "blue")$1$(styleColorRst) $(styleColor "cyan")[$2]$(styleColorRst): " + read -r response + echo ${response} +} +function displayYesNo { + response=$(displayQuestion "$1" "y/N") + if [ "$response" == "y" ] || [ "$response" == "Y" ]; then + echo "yes" + else + echo "no" + fi } # Packages # --- Entry Point --- -styleTitle "OBJNULL Dotfile Installer" +clear +displayTitle "OBJNULL Dotfile Installer" + +echo -e "This script is designed to quickly install any required components" +echo -e "so that your system is up and running quick with a speedy shell.\n" + +response=$(displayYesNo "Continue") +if [ ${response} != "yes" ]; then + echo -e "$(styleColor "red")Goodbye...$(styleColorRst)" +fi