Skip to content

Commit

Permalink
Merge pull request #245 from KIT-CMS/init_again
Browse files Browse the repository at this point in the history
fix distro settings once and for all
  • Loading branch information
a-monsch committed Feb 7, 2024
2 parents 658b008 + 22cb110 commit 4c2c468
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ else
distro=$(lsb_release -i | cut -f2)
os_version=$(lsb_release -r | cut -f2)
fi
distro=${distro//[[:space:]]/}
distro="${distro//Linux/}"
distro="${distro//linux/}"
echo "Setting up CROWN for $distro Version $os_version"
# check if the distro is centos
if [[ "$distro" == "CentOS" || "$distro" == "CentOS Linux" ]]; then
if [[ "$distro" == "CentOS" ]]; then
# if the first number of os_version is a 7, we are on centOS 7
if [[ ${os_version:0:1} == "7" ]]; then # if uname -a | grep -E 'el7' -q
# source /cvmfs/sft-nightlies.cern.ch/lcg/views/dev3/latest/x86_64-centos7-gcc11-opt/setup.sh
Expand All @@ -29,7 +32,7 @@ if [[ "$distro" == "CentOS" || "$distro" == "CentOS Linux" ]]; then
echo "Unsupported CentOS version, exiting..."
return 0
fi
elif [[ "$distro" == "RedHatEnterprise" || "$distro" == "AlmaLinux" || "$distro" == "Rocky Linux" ]]; then
elif [[ "$distro" == "RedHatEnterprise" || "$distro" == "Alma" || "$distro" == "Rocky" ]]; then
if [[ ${os_version:0:1} == "8" ]]; then # elif uname -a | grep -E 'el8' -q
# no lcg 103 available for centOS 8
source /cvmfs/sft.cern.ch/lcg/views/LCG_102/x86_64-centos8-gcc11-opt/setup.sh
Expand Down

0 comments on commit 4c2c468

Please sign in to comment.