„install.sh“ ändern

This commit is contained in:
Yann Mölle 2023-04-17 21:21:59 +02:00
parent 09db15f3b3
commit 0bf134bf4b

View File

@ -9,19 +9,19 @@ fi
# Check which Linux distribution is installed # Check which Linux distribution is installed
if [ -f /etc/os-release ]; then if [ -f /etc/os-release ]; then
. /etc/os-release . /etc/os-release
if [ "$ID" == "ubuntu" ]; then if [ "$ID" = "ubuntu" ]; then
echo "Detected Ubuntu." echo "Detected Ubuntu."
PACKAGE_MANAGER="apt-get-ubuntu" PACKAGE_MANAGER="apt-get-ubuntu"
elif [ "$ID" == "opensuse" ]; then elif [ "$ID" = "opensuse" ]; then
echo "Detected openSUSE." echo "Detected openSUSE."
PACKAGE_MANAGER="zypper" PACKAGE_MANAGER="zypper"
elif [ "$ID" == "debian" ]; then elif [ "$ID" = "debian" ]; then
echo "Detected Debian." echo "Detected Debian."
PACKAGE_MANAGER="apt-get" PACKAGE_MANAGER="apt-get"
elif [ "$ID" == "alpine" ]; then elif [ "$ID" = "alpine" ]; then
echo "Detected Alpine Linux." echo "Detected Alpine Linux."
PACKAGE_MANAGER="apk" PACKAGE_MANAGER="apk"
elif [ "$ID" == "centos" ]; then elif [ "$ID" = "centos" ]; then
echo "Detected CentOS." echo "Detected CentOS."
PACKAGE_MANAGER="yum" PACKAGE_MANAGER="yum"
else else
@ -36,17 +36,17 @@ fi
# Install Docker # Install Docker
read -p "Do you want to install Docker? (y/n) " INSTALL_DOCKER read -p "Do you want to install Docker? (y/n) " INSTALL_DOCKER
if [ "$INSTALL_DOCKER" == "y" ]; then if [ "$INSTALL_DOCKER" = "y" ]; then
echo "Installing Docker ..." echo "Installing Docker ..."
if [ "$PACKAGE_MANAGER" == "apt-get" ] then if [ "$PACKAGE_MANAGER" = "apt-get" ] then
bash -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/debian.sh)" bash -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/debian.sh)"
elif [ "$PACKAGE_MANAGER" == "apt-get-ubuntu" ]; then elif [ "$PACKAGE_MANAGER" = "apt-get-ubuntu" ]; then
bash -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/ubuntu.sh)" bash -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/ubuntu.sh)"
elif [ "$PACKAGE_MANAGER" == "zypper" ]; then elif [ "$PACKAGE_MANAGER" = "zypper" ]; then
sh -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/opensuse.sh)" sh -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/opensuse.sh)"
elif [ "$PACKAGE_MANAGER" == "apk" ]; then elif [ "$PACKAGE_MANAGER" = "apk" ]; then
sh -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/alpine.sh)" sh -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/alpine.sh)"
elif [ "$PACKAGE_MANAGER" == "yum" ]; then elif [ "$PACKAGE_MANAGER" = "yum" ]; then
bash -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/centos.sh)" bash -c "$(curl -L https://git.moelle.space/hxcde/docker-auto-installer/raw/branch/main/centos.sh)"
fi fi
fi fi