From 47dd0bffcc82d32c9553a153db3e440dcb765c7b Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 16 Dec 2016 16:11:59 -0300 Subject: Omit extern.pkg from the main iraf package, to avoid losing existing package definitions when re-installing iraf. Fix some quoting. --- iraf/build.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/iraf/build.sh b/iraf/build.sh index 0ce0b6e..0e34904 100644 --- a/iraf/build.sh +++ b/iraf/build.sh @@ -16,13 +16,18 @@ fi echo # Install into PREFIX -if ! ./install $PREFIX; then +if ! ./install "$PREFIX"; then echo "IRAF installation into $PREFIX failed" 2>&1 exit 1 fi +# Remove extern.pkg from the Conda package, so that re-installing "iraf" won't +# overwrite any existing package definitions with a blank version. The file +# instead gets auto-generated/updated when installing external IRAF packages. +rm -f "$PREFIX/extern.pkg" + # "Register" the IRAF environment setup with conda activate: -mkdir -p $PREFIX/etc/conda/{activate.d,deactivate.d} +mkdir -p "$PREFIX"/etc/conda/{activate.d,deactivate.d} echo ' if [ -n "$CONDA_PREFIX" ]; then @@ -30,8 +35,8 @@ if [ -n "$CONDA_PREFIX" ]; then else source $CONDA_ENV_PATH/bin/setup_iraf.sh fi -' > $PREFIX/etc/conda/activate.d/iraf.sh -chmod 755 $PREFIX/etc/conda/activate.d/iraf.sh +' > "$PREFIX/etc/conda/activate.d/iraf.sh" +chmod 755 "$PREFIX/etc/conda/activate.d/iraf.sh" echo ' if [ -n "$CONDA_PREFIX" ]; then @@ -39,6 +44,6 @@ if [ -n "$CONDA_PREFIX" ]; then else source $CONDA_ENV_PATH/bin/forget_iraf.sh fi -' > $PREFIX/etc/conda/deactivate.d/iraf.sh -chmod 755 $PREFIX/etc/conda/deactivate.d/iraf.sh +' > "$PREFIX/etc/conda/deactivate.d/iraf.sh" +chmod 755 "$PREFIX/etc/conda/deactivate.d/iraf.sh" -- cgit