Skip to content

Commit

Permalink
Add compatibility for CentOS/RockyLinux/AlmaLinux 8
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu committed Jan 3, 2025
1 parent c71d8f2 commit 036121a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion install_ant-media-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ distro () {
exit 1
fi

if [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then
if [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then
echo $msg
exit 1
fi
Expand Down Expand Up @@ -333,6 +333,15 @@ elif [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] |
$SUDO yum -y install unzip zip libva libvdpau
$SUDO unzip -o $ANT_MEDIA_SERVER_ZIP_FILE "ant-media-server/ant-media-server.jar" -d /tmp/
VERSION=$(unzip -p /tmp/ant-media-server/ant-media-server.jar | grep -a "Implementation-Version"|cut -d' ' -f2 | tr -d '\r')
OS_VERSION=$(echo $VERSION_ID | cut -d. -f1)

if [ "$OS_VERSION" == "8" ]; then
if [[ "$(printf '%s\n' "$VERSION" "2.12.0" | sort -V | head -n1)" == "2.12.0" ]]; then
echo -e "${RED}AMS version 2.12.0 and above (including version $VERSION) is not supported on $ID 8 distributions.${NC}"
exit 1
fi
fi

if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$VERSION" | sort -V | head -n1)" != "$REQUIRED_VERSION" ]; then
check_version
$SUDO yum -y install libcrystalhd
Expand Down

0 comments on commit 036121a

Please sign in to comment.