diff --git a/deploy.sh b/deploy.sh index 963df3a..8ba73c6 100644 --- a/deploy.sh +++ b/deploy.sh @@ -7,13 +7,21 @@ GREEN='\033[0;32m' RED='\033[0;31m' NOCOL='\033[0m' -echo -e "${GREEN}XO Application deployment...${NOCOL}" -echo -n +Fail() { + echo -e "${RED}no package was selected, exitting${NOCOL}" + exit 1 +} + +Exec() { + echo -e "${GREEN}Starting installation of $1${NOCOL}" + sleep 2 + bash -c "$(curl -fsSL $REPO/raw/master/$1/install.sh)" + exit 0 +} if [[ -z $1 ]] then - echo -e "${RED}no package selected, exitting${NOCOL}" - exit 1 + Fail else - bash -c "$(curl -fsSL $REPO/raw/master/$1/install.sh)" + Exec fi