rewritten to functions
This commit is contained in:
parent
9d3c3a5223
commit
44a7fa63d1
18
deploy.sh
18
deploy.sh
@ -7,13 +7,21 @@ GREEN='\033[0;32m'
|
|||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
NOCOL='\033[0m'
|
NOCOL='\033[0m'
|
||||||
|
|
||||||
echo -e "${GREEN}XO Application deployment...${NOCOL}"
|
Fail() {
|
||||||
echo -n
|
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 ]]
|
if [[ -z $1 ]]
|
||||||
then
|
then
|
||||||
echo -e "${RED}no package selected, exitting${NOCOL}"
|
Fail
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
bash -c "$(curl -fsSL $REPO/raw/master/$1/install.sh)"
|
Exec
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user