Changeset 4934


Ignore:
Timestamp:
May 6, 2024, 12:46:55 PM (13 days ago)
Author:
abarral
Message:

fix run for users w/o svn
make sourceable as a lib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install_amaury/install_lmdz.sh

    r4930 r4934  
    575575        cd -
    576576    else  # get svn from info
    577          used_lmdz_rev=$(svn info | grep "Last Changed Rev" | cut -c 19-)
     577         set +e; used_lmdz_rev=$(svn info | grep "Last Changed Rev" | cut -c 19-); set -e
     578         if [[ -z $used_lmdz_rev ]]; then  # svn info failed
     579            used_lmdz_rev=$(grep 'Revision: [0-9]' "$MODEL"/Read*.md | awk ' { print $2 } ' 2>/dev/null)
     580            if [[ -z $used_lmdz_rev ]]; then echo "Could not determine lmdz version. This is likely an issue with the .tar itself, please report to LMDZ team."; exit 1; fi
     581         fi
    578582    fi
    579583}
     
    838842}
    839843
     844# If sourced: returns, else run setup
     845if [[ ! "${BASH_SOURCE[0]}" = "$0" ]]; then return 0; fi
     846
    840847echo "install_lmdz.sh DEBUT $(date)"
    841848
Note: See TracChangeset for help on using the changeset viewer.