diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2539500e1..5536f8727 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,9 +15,6 @@ jobs: sudo apt install gcc build-essential libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev sudo apt install flex byacc libmotif-common libmotif-dev libxpm4 libxpm-dev sudo apt install gfortran-8 - # Create symlink to make variables work - sudo mkdir -p /home/gempak - sudo ln -s `pwd` /home/gempak/GEMPAK7 . Gemenviron.profile rm -f config/Makeinc.linux64_gfortran ln -s `pwd`/config/Makeinc.linux64_gfortran_ubuntu config/Makeinc.linux64_gfortran diff --git a/Gemenviron b/Gemenviron index db243fa69..b7a0d55dd 100644 --- a/Gemenviron +++ b/Gemenviron @@ -1,7 +1,26 @@ # Gemenviron file for GEMPAK # +# Setting of the NAWIPS environment variable is critical to the proper +# operation of GEMPAK. It defines the installation directory of GEMPAK. +# There are now three ways for this variable to be set: +# 1) Define the NAWIPS variable prior to sourcing this Gemenviron file. +# 2) Let this Gemenviron file dynamically set it based on the filesystem +# location of this script (recommended / default). +# 3) Manually set it below. +if (! $?NAWIPS) then + # Set the NAWIPS variable based on the location of this script. + set called=($_) + if ( "$called" != "" ) then ### called by source + set script_fn=`readlink -f $called[2]` + else ### called by direct execution of the script + set script_fn=`readlink -f $0` + endif + set script_dir=`dirname $script_fn` + setenv NAWIPS $script_dir +endif + # Please configure the following definitions to reflect your system: -setenv NAWIPS /home/gempak/GEMPAK7 +# setenv NAWIPS /home/gempak/GEMPAK7 setenv EDEX_SERVER "edex-cloud.unidata.ucar.edu" # # Sets environment variables used in running GEMPAK diff --git a/Gemenviron.profile b/Gemenviron.profile index 770a11117..8349a2c4e 100644 --- a/Gemenviron.profile +++ b/Gemenviron.profile @@ -1,7 +1,19 @@ # Gemenviron file for GEMPAK # +# Setting of the NAWIPS environment variable is critical to the proper +# operation of GEMPAK. It defines the installation directory of GEMPAK. +# There are now three ways for this variable to be set: +# 1) Define the NAWIPS variable prior to sourcing this Gemenviron file. +# 2) Let this Gemenviron file dynamically set it based on the filesystem +# location of this script (recommended / default). +# 3) Manually set it below. +if [ -z ${NAWIPS+x} ]; then + # Set the NAWIPS variable based on the location of this script. + NAWIPS=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +fi + # Please configure the following definitions to reflect your system: -NAWIPS=/home/gempak/GEMPAK7 +# NAWIPS=/home/gempak/GEMPAK7 export EDEX_SERVER="edex-cloud.unidata.ucar.edu" # # Sets environment variables used in running GEMPAK