From fb99e89924b0afd68462227899282db0b340df34 Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 18 Apr 2018 11:25:49 -0400 Subject: [PATCH] case statements and line breaks --- deps.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/deps.sh b/deps.sh index 0648c49..9c7dcf7 100755 --- a/deps.sh +++ b/deps.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash #These are the base dependencies for any install echo "installing base dependencies" @@ -14,14 +14,15 @@ sudo apt-get -my install git \ curl \ # byobu \ -read -p "Does this system need ssh access?" -n 1 -r - if [[ ! $REPLY =~ ^[Yy]$ ]] - then sudo apt-get install openssh-server +read -n1 -p $'Does this system need ssh access?\n' REPLY + if [[ $REPLY == [Yy] ]]; then + sudo apt-get install openssh-server fi -read -p "Does this system have a GUI?" -n 1 -r - if [[ ! $REPLY = [Yy]$ ]] - then sudo apt-get install emacs - else sudo apt-get install emacs-nox +read -n1 -p $'\nDoes this system have a GUI?\n' REPLY + if [[ $REPLY == [Yy] ]]; then + sudo apt-get install emacs + else + sudo apt-get install emacs-nox fi #echo "enabling byobu"