add rhel support to configure.sh

This commit is contained in:
JJ
2023-08-07 11:26:15 +02:00
parent 862d85b063
commit 757ea664ed

View File

@@ -25,9 +25,9 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
fi
fi
# If linux
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release)
local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release)
if [[ ${DISTRIB} = "ubuntu"* ]]; then
echo "Grabbing latest apt caches"
sudo apt-get update
@@ -42,7 +42,7 @@ fi
echo "Installing OneUptime 🟢"
if [[ ! $(which git) ]]; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release)
local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release)
if [[ ${DISTRIB} = "ubuntu"* ]] || [[ ${DISTRIB} = "debian"* ]]; then
sudo apt install -y git
elif [[ ${DISTRIB} = "fedora"* ]] || [[ ${DISTRIB} = "almalinux"* ]] || [[ ${DISTRIB} = "rockylinux"* ]] || [[ ${DISTRIB} = "rhel"* ]]; then
@@ -54,6 +54,7 @@ if [[ ! $(which git) ]]; then
fi
fi
if [[ $IS_DOCKER == "true" ]]
then
echo "This script should run in the docker container."
@@ -99,10 +100,9 @@ if [[ ! $(which node) && ! $(node --version) ]]; then
fi
fi
if [[ ! $(which git) ]]; then
if [[ ! $(which npm) ]]; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release)
local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release)
if [[ ${DISTRIB} = "ubuntu"* ]] || [[ ${DISTRIB} = "debian"* ]]; then
echo "Setting up NPM"
sudo apt-get install -y npm
@@ -110,7 +110,8 @@ if [[ ! $(which git) ]]; then
echo "Setting up NPM"
sudo dnf install -y npm
fi
fi
fi
if [[ ! $(which docker) && ! $(docker --version) ]]; then
echo "Setting up Docker"