From 09607b8fc4261e5273db4fdec75ae11ea8c9e195 Mon Sep 17 00:00:00 2001 From: anujajakhade Date: Thu, 12 Aug 2021 10:11:14 +0530 Subject: [PATCH] Added a generic fix for enabling SLES repos Signed-off-by: Anuja Jakhade --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 697dcd4..507d88f 100755 --- a/install.sh +++ b/install.sh @@ -536,8 +536,10 @@ do_install() { echo "Packages for SLES are currently only available for s390x" exit 1 fi + + sles_version="${dist_version##*.}" sles_repo="$DOWNLOAD_URL/linux/$lsb_dist/$REPO_FILE" - opensuse_repo="https://download.opensuse.org/repositories/security:SELinux/SLE_15_SP2/security:SELinux.repo" + opensuse_repo="https://download.opensuse.org/repositories/security:SELinux/SLE_15_SP$sles_version/security:SELinux.repo" if ! curl -Ifs "$sles_repo" > /dev/null; then echo "Error: Unable to curl repository file $sles_repo, is it valid?" exit 1