skip docker question if apt doesn't exists
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
13
install.sh
13
install.sh
@@ -477,6 +477,7 @@ uninstall() {
|
||||
|
||||
# $SUDO_CMD /sbin/iptables -D DOCKER-USER -F
|
||||
|
||||
if [ "$APT" == "1" ]; then
|
||||
echo "Would you like to remove docker? (Y/n)";
|
||||
read -r ANSWER;
|
||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
||||
@@ -488,11 +489,13 @@ uninstall() {
|
||||
|
||||
echo "x";
|
||||
fi
|
||||
fi;
|
||||
|
||||
echo "x";
|
||||
}
|
||||
|
||||
SUDO_CMD="";
|
||||
APT=$($SUDO_CMD type apt 2>/dev/null | grep 'apt is' | wc -l);
|
||||
|
||||
if [ "$1" == "remove" ]; then
|
||||
ACTION="uninstall";
|
||||
@@ -542,9 +545,10 @@ if [ -n "$WSL_DISTRO_NAME" ]; then
|
||||
fi
|
||||
fi;
|
||||
|
||||
echo "Would you like to install/update docker? (y/N)";
|
||||
read -r ANSWER;
|
||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
||||
if [ "$APT" == "1" ]; then
|
||||
echo "Would you like to install/update docker? (y/N)";
|
||||
read -r ANSWER;
|
||||
if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
||||
|
||||
if [ -f "/etc/apt/keyrings/docker.gpg" ]; then
|
||||
rm -f /etc/apt/keyrings/docker.gpg
|
||||
@@ -556,7 +560,8 @@ if [ "$ANSWER" == "y" ] || [ "$ANSWER" == "Y" ]; then
|
||||
|
||||
echo "Wait..."
|
||||
sleep 5
|
||||
fi
|
||||
fi
|
||||
fi;
|
||||
|
||||
$SUDO_CMD docker pull registry.format.hu/installer-tool
|
||||
$SUDO_CMD docker pull registry.format.hu/setup
|
||||
|
Reference in New Issue
Block a user