From fc17b2e520bab4c8895026f7645526b0987958ec Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Wed, 8 Jan 2025 21:26:27 +0100 Subject: [PATCH] pr comments --- makedist | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/makedist b/makedist index 5c6ec5e..91f749f 100755 --- a/makedist +++ b/makedist @@ -206,14 +206,13 @@ case $1 in elif [ $EL -eq 7 ]; then BASEURL="https://repository.egi.eu/sw/production/umd/4/centos7/x86_64/updates" else - echo "ERROR: unsupported OS for egi! only centos7, almalinux9 supported." + echo "ERROR: unsupported OS for egi! only centos7, almalinux9 supported." >&2 exit 1 fi BASELIST="`curl -Ls $BASEURL/|grep "cvmfs-"|sed 's/.*href="//;s/".*//'`";; default|none) INCLUDEHELPER=false - BASEURL="https://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs/EL/$EL/x86_64" - BASEURL_MIRROR1="https://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs/EL/$EL/x86_64";; + BASEURL="https://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs/EL/$EL/x86_64";; *) usage;; esac DISTTYPE=$1 @@ -262,19 +261,6 @@ if [ "$DISTTYPE" = egi ] && [ "$EL" = 8 ]; then exit 1 fi -CVMFS_BASEURL_MIRROR1="https://cvmrepo.s3.cern.ch/cvmrepo" -CVMFS_BASEURL_MIRROR2="https://cvmrepo.web.cern.ch/cvmrepo" -CVMFS_BASEURL=$CVMFS_BASEURL_MIRROR1 -CVMFSVERSION="`curl -Ls $CVMFS_BASE_URL/.latest_cvmfs_version_prod`" -if [ -z "CVMFSVERSION" ]; then - echo "WARN: Couldn't find .latest_cvmfs_version_prod in mirror $CVMFS_BASEURL, switching over.." - CVMFS_BASEURL="$CVMFS_BASE_URL_MIRROR2" -fi -CVMFSVERSION="`curl -Ls $CVMFS_BASEURL/.latest_cvmfs_version_prod`" -if [ -z "CVMFSVERSION" ]; then - echo "ERROR: Couldn't find .latest_cvmfs_version_prod in mirror $CVMFS_BASEURL, and no mirrors left! " - exit 1 -fi URLS="" CVMFSURL="" @@ -291,6 +277,19 @@ if [ "$ARCH" = "ppc64le" ]; then CVMFSRPMNAME="$(basename $CVMFSRPMURLS)" CVMFSVERSION="`echo "$CVMFSRPMNAME" 's/.*cvmfs-\([^-]*\)-.*/\1/'`" else + CVMFS_BASEURL_MIRROR1="https://cvmrepo.s3.cern.ch/cvmrepo" + CVMFS_BASEURL_MIRROR2="https://cvmrepo.web.cern.ch/cvmrepo" + CVMFS_BASEURL=$CVMFS_BASEURL_MIRROR1 + CVMFSVERSION="`curl -Ls $CVMFS_BASE_URL/.latest_cvmfs_version_prod`" + if [ -z "CVMFSVERSION" ]; then + echo "WARN: Couldn't find .latest_cvmfs_version_prod in mirror $CVMFS_BASEURL, switching over.." >&2 + CVMFS_BASEURL="$CVMFS_BASE_URL_MIRROR2" + CVMFSVERSION="`curl -Ls $CVMFS_BASEURL/.latest_cvmfs_version_prod`" + if [ -z "CVMFSVERSION" ]; then + echo "ERROR: Couldn't find .latest_cvmfs_version_prod in mirror $CVMFS_BASEURL, and no mirrors left! " >&2 + exit 1 + fi + fi CVMFSURL="$CVMFS_BASEURL/yum/cvmfs/$DISTRO_YUM/$VERS/$ARCH" CVMFSRPMNAME="cvmfs-$CVMFSVERSION-1.$MACH.$ARCH.rpm" CVMFSRPMURLS="$CVMFSURL/$CVMFSRPMNAME"