From c3320669b2949b4204ce5bddc3d6265e279ad0bf Mon Sep 17 00:00:00 2001 From: Michael James Date: Tue, 23 Aug 2016 21:53:55 +0000 Subject: [PATCH] installl scripts should account for el7 repo --- installCAVE.sh | 13 +++++++++---- installEDEX.sh | 8 +++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/installCAVE.sh b/installCAVE.sh index e362e64313..61d20b0881 100755 --- a/installCAVE.sh +++ b/installCAVE.sh @@ -15,12 +15,17 @@ if [ ! -f /etc/yum.repos.d/awips2.repo ]; then echo '' echo 'Downloading awips2repo yum file to /etc/yum.repos.d/awips2.repo' echo '' - wget -O /etc/yum.repos.d/awips2.repo http://www.unidata.ucar.edu/software/awips2/doc/awips2.repo - echo "Running 'yum clean all'" - yum clean all - echo '' + if [[ $(grep "release 7" /etc/redhat-release) ]]; then + wget -O /etc/yum.repos.d/awips2.repo http://www.unidata.ucar.edu/software/awips2/doc/el7.repo + else + wget -O /etc/yum.repos.d/awips2.repo http://www.unidata.ucar.edu/software/awips2/doc/awips2.repo + fi fi +echo "Running 'yum clean all'" +yum clean all +echo '' + # # If CAVE is not installed them make sure /awips2/cave/ # and /awips2/alertviz/ are removed before installing. diff --git a/installEDEX.sh b/installEDEX.sh index 938122fbf1..c9aaca60e5 100755 --- a/installEDEX.sh +++ b/installEDEX.sh @@ -9,11 +9,17 @@ # # Download yum repo file from Unidata # + + if [ ! -f /etc/yum.repos.d/awips2.repo ]; then echo '' echo 'Downloading awips2repo yum file to /etc/yum.repos.d/awips2.repo' echo '' - wget -O /etc/yum.repos.d/awips2.repo http://www.unidata.ucar.edu/software/awips2/doc/awips2.repo + if [[ $(grep "release 7" /etc/redhat-release) ]]; then + wget -O /etc/yum.repos.d/awips2.repo http://www.unidata.ucar.edu/software/awips2/doc/el7.repo + else + wget -O /etc/yum.repos.d/awips2.repo http://www.unidata.ucar.edu/software/awips2/doc/awips2.repo + fi fi #