File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ set -x -e -o pipefail
33
44TARGET=$1
55
6- MAJOR=$( echo " ${TARGET} " | grep -oP ' (?<=almalinux:)[89]' )
7- MINOR=$( echo " ${TARGET} " | grep -oP ' (?<=almalinux:[89]\.)\d+' )
6+ VERSION=" ${TARGET#*: } "
7+ MAJOR=" ${VERSION%% .* } "
8+ MINOR=" ${VERSION#* .} "
89
910if [[ " ${MAJOR} " == " 8" ]]; then
1011 rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
11- elif [[ " ${MAJOR} " == " 9 " ]] ; then
12- rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-9
12+ else
13+ rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-${MAJOR}
1314fi
1415
1516mkdir -p /run/user/${UID}
@@ -27,9 +28,9 @@ dnf config-manager --enable appstream
2728if [[ " $MAJOR " == " 8" ]]; then
2829 dnf config-manager --enable powertools || true
2930 dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
30- elif [[ " $MAJOR " == " 9 " ]] ; then
31+ else
3132 dnf config-manager --enable crb || true
32- dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9 .noarch.rpm
33+ dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${MAJOR} .noarch.rpm
3334fi
3435
3536dnf group install -y " Development Tools"
You can’t perform that action at this time.
0 commit comments