diff options
author | Aaron LI <aaronly.me@gmail.com> | 2016-03-23 19:10:48 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@gmail.com> | 2016-03-23 19:10:48 +0800 |
commit | 593491a6d68470fc2f535ba4216f31fcfae6ab2f (patch) | |
tree | c5ace57f781aef855e64556f5d3f674bae5e85d0 | |
parent | c55cb300d23f9e980f9025258dcdb7095b05da2a (diff) | |
download | dotfiles-593491a6d68470fc2f535ba4216f31fcfae6ab2f.tar.bz2 |
_zshrc.local: simplify astro software initilization
-rw-r--r-- | _zshrc.local | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/_zshrc.local b/_zshrc.local index 06d3411..f9ebcbc 100644 --- a/_zshrc.local +++ b/_zshrc.local @@ -27,29 +27,21 @@ function heainit() { fi export CALDBCONFIG="${CALDB}/software/tools/caldb.config" export CALDBALIAS="${CALDB}/software/tools/alias_config.fits" - HEA_STATE="`echo $PATH | tr ':' '\n' | grep 'heasoft'`" - if [ "x${HEA_STATE}" = "x" ]; then + if [ "x${LHEASOFT}" = "x" ]; then source $HEADAS/headas-init.sh fi - unset HEA_STATE export LD_LIBRARY_PATH="${LD_LIBRARY_PATH_BAK}" } ## CIAO settings export CIAO_PATH="$HOME/local/ciao/ciao-4.6" function ciaoinit() { - HEA_STATE="`echo $PATH | tr ':' '\n' | grep 'heasoft'`" - CIAO_STATE="`echo $PATH | tr ':' '\n' | grep 'ciao'`" - if [ "x${HEA_STATE}" = "x" ]; then - heainit - fi - if [ "x${CIAO_STATE}" = "x" ]; then + heainit + if [ "x${ASCDS_INSTALL}" = "x" ]; then source $CIAO_PATH/bin/ciao.bash else source $CIAO_PATH/bin/ciao.bash -o fi - unset HEA_STATE - unset CIAO_STATE export CIAO_LD_LIBRARY_PATH="${ASCDS_INSTALL}/ots/lib" } |