rewritten to functions

This commit is contained in:
Marcel Stangenberger 2025-04-11 19:38:16 +00:00
parent 9d3c3a5223
commit 44a7fa63d1

View File

@ -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