(simatec) v0.8.2
This commit is contained in:
19
update.sh
19
update.sh
@@ -50,38 +50,39 @@ BLA::stop_loading_animation() {
|
||||
|
||||
#######################################################################################
|
||||
|
||||
|
||||
# App Check
|
||||
for bin in curl docker git; do
|
||||
if [[ -z $(which ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi
|
||||
if [[ -z $(which ${bin}) ]]; then echo "${redBold}Cannot find ${bin}, exiting...${normal}"; exit 1; fi
|
||||
done
|
||||
|
||||
# Docker-Compose Check
|
||||
if docker compose > /dev/null 2>&1; then
|
||||
if docker compose version --short | grep "^2." > /dev/null 2>&1; then
|
||||
COMPOSE_VERSION=native
|
||||
echo -e "${red}Found Docker Compose Plugin (native).${normal}"
|
||||
echo -e "${red}Setting the DOCKER_COMPOSE_VERSION Variable to native${normal}"
|
||||
echo -e "${purple}Found Docker Compose Plugin (native).${normal}"
|
||||
echo -e "${purple}Setting the DOCKER_COMPOSE_VERSION Variable to native${normal}"
|
||||
sleep 2
|
||||
echo -e "${purple}Notice: You´ll have to update this Compose Version via your Package Manager manually!${normal}"
|
||||
else
|
||||
echo -e "${red}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
|
||||
echo -e "${redBold}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
|
||||
exit 1
|
||||
fi
|
||||
elif docker-compose > /dev/null 2>&1; then
|
||||
if ! [[ $(alias docker-compose 2> /dev/null) ]] ; then
|
||||
if docker-compose version --short | grep "^2." > /dev/null 2>&1; then
|
||||
COMPOSE_VERSION=standalone
|
||||
echo -e "${red}Found Docker Compose Standalone.${normal}"
|
||||
echo -e "${red}Setting the DOCKER_COMPOSE_VERSION Variable to standalone${normal}"
|
||||
echo -e "${purple}Found Docker Compose Standalone.${normal}"
|
||||
echo -e "${purple}Setting the DOCKER_COMPOSE_VERSION Variable to standalone${normal}"
|
||||
sleep 2
|
||||
else
|
||||
echo -e "${red}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
|
||||
echo -e "${redBold}Cannot find Docker Compose with a Version Higher than 2.X.X.${normal}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
echo -e "${red}Cannot find Docker Compose.${normal}"
|
||||
echo -e "${redBold}Cannot find Docker Compose.${normal}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -92,7 +93,7 @@ while true; do
|
||||
case $yn in
|
||||
[Yy]* ) echo "${greenBold}********* Update started... Please wait... *********${normal}"; break;;
|
||||
[Nn]* ) echo -e "${redBold} The update is canceled!${normal}"; exit;;
|
||||
* ) echo -e "${red} Please confirm with y or n.";;
|
||||
* ) echo -e "${redBold} Please confirm with y or n.${normal}";;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user