@@ -91,7 +91,7 @@ _installCommonDev() {
9191 cmakeBin=${cmakePrefix} /bin/cmake
9292 if [[ ! -f ${cmakeBin} || -z $( ${cmakeBin} --version | grep ${cmakeVersionBig} ) ]]; then
9393 cd " ${baseDir} "
94- eval wget https://cmake.org/files/ v${cmakeVersionBig } /cmake-${cmakeVersionSmall} -${osName} -${arch} .sh
94+ eval wget https://github.com/Kitware/CMake/releases/download/ v${cmakeVersionSmall } /cmake-${cmakeVersionSmall} -linux -${arch} .sh
9595 md5sum -c <( echo " ${cmakeChecksum} cmake-${cmakeVersionSmall} -${osName} -${arch} .sh" ) || exit 1
9696 chmod +x cmake-${cmakeVersionSmall} -${osName} -${arch} .sh
9797 ./cmake-${cmakeVersionSmall} -${osName} -${arch} .sh --skip-license --prefix=${cmakePrefix}
@@ -861,10 +861,10 @@ while [ "$#" -gt 0 ]; do
861861 export GIT_SSL_NO_VERIFY=true
862862 ;;
863863 -save-deps-prefixes=* )
864- saveDepsPrefixes=$( realpath ${1# -save-deps-prefixes =} )
864+ saveDepsPrefixes=$( realpath ${1#* =} )
865865 ;;
866866 -threads=* )
867- numThreads=${1}
867+ numThreads=${1#* = }
868868 ;;
869869 * )
870870 echo " unknown option: ${1} " >&2
@@ -933,11 +933,13 @@ case "${os}" in
933933 _installOrTools " ubuntu" " ${ubuntuVersion} " " amd64"
934934 fi
935935 ;;
936- " Red Hat Enterprise Linux" | " Rocky Linux" )
936+ " Red Hat Enterprise Linux" | " Rocky Linux" | " AlmaLinux " )
937937 if [[ " ${os} " == " Red Hat Enterprise Linux" ]]; then
938938 rhelVersion=$( rpm -q --queryformat ' %{VERSION}' redhat-release | cut -d. -f1)
939939 elif [[ " ${os} " == " Rocky Linux" ]]; then
940940 rhelVersion=$( rpm -q --queryformat ' %{VERSION}' rocky-release | cut -d. -f1)
941+ elif [[ " ${os} " == " AlmaLinux" ]]; then
942+ rhelVersion=$( rpm -q --queryformat ' %{VERSION}' almalinux-release | cut -d. -f1)
941943 fi
942944 if [[ " ${rhelVersion} " != " 8" ]] && [[ " ${rhelVersion} " != " 9" ]]; then
943945 echo " ERROR: Unsupported ${rhelVersion} version. Versions '8' and '9' are supported."
@@ -1018,4 +1020,8 @@ esac
10181020if [[ ! -z ${saveDepsPrefixes} ]]; then
10191021 mkdir -p " $( dirname $saveDepsPrefixes ) "
10201022 echo " $CMAKE_PACKAGE_ROOT_ARGS " > $saveDepsPrefixes
1023+ # Fix permissions if running as root to allow user access
1024+ if [[ $( id -u) == 0 && ! -z " ${SUDO_USER+x} " ]]; then
1025+ chown " $SUDO_USER :$( id -gn " $SUDO_USER " ) " " $saveDepsPrefixes " 2> /dev/null || true
1026+ fi
10211027fi
0 commit comments