From 66115cf46cf6f06e6edd01d92c968650465f505b Mon Sep 17 00:00:00 2001 From: Jiahao Dai <20123225@student.shiep.edu.cn> Date: Fri, 9 Oct 2015 12:15:33 +0800 Subject: [PATCH] Better solution on #4 --- hyper-bootstrap.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hyper-bootstrap.sh b/hyper-bootstrap.sh index 999a68f..e8085e5 100755 --- a/hyper-bootstrap.sh +++ b/hyper-bootstrap.sh @@ -25,7 +25,15 @@ DEBIAN_CODE=(jessie wheezy) CENTOS_VER=(6 7) FEDORA_VER=(20 21 22) #Color Constant -[ ! -z ${TERM} ] || TERM="xterm" # tput would complain without $TERM environ +# reset virables +RED='' +GREEN='' +YELLOW='' +BLUE='' +WHITE='' +LIGHT='' +RESET='' +[ -z ${TERM} ] || { RED=`tput setaf 1` GREEN=`tput setaf 2` YELLOW=`tput setaf 3` @@ -33,6 +41,7 @@ BLUE=`tput setaf 4` WHITE=`tput setaf 7` LIGHT=`tput bold ` RESET=`tput sgr0` +} #Error Message ERR_ROOT_PRIVILEGE_REQUIRED=(10 "This install script need root privilege, please retry use 'sudo' or root user!") ERR_NOT_SUPPORT_PLATFORM=(20 "Sorry, Hyper only support x86_64 platform!")