Skip to content

Commit

Permalink
Merge pull request #45 from jhoblitt/tickets/DM-10587-csh
Browse files Browse the repository at this point in the history
fix newinstall.sh csh support
  • Loading branch information
jhoblitt committed Jun 16, 2017
2 parents 410de5b + a4a3f94 commit cc644da
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
21 changes: 18 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
sudo: false
language: cpp
os:
- linux
Expand All @@ -9,6 +8,10 @@ dist: trusty
compiler:
- clang
- gcc
addons:
apt:
packages:
- tcsh
script: |
set -e
if [[ $BATCH == true ]]; then
Expand All @@ -18,13 +21,25 @@ script: |
echo -e "*** testing interactive mode in Python version $PYVER ***\n"
echo -e "yes\nyes" | bash -x ./scripts/newinstall.sh -c -${PYVER}
fi
echo -e "*** Initialising bash environment **\n"
source loadLSST.bash
echo -e "*** Testing initializaion of shell environment ***\n"
case $MANGLER in
tcsh)
# csh_20110502-2ubuntu2_amd64.deb from ubuntu:trusty (travis) opens a new
# shell interactive shell when passed--version
tcsh --version
tcsh -ec 'source loadLSST.csh && echo $EUPS_PKGROOT'
;;
*)
bash --version
bash -ec 'source loadLSST.bash && echo $EUPS_PKGROOT'
;;
esac
env:
- BATCH=true PYVER="2"
- BATCH=true PYVER="3"
- BATCH=false PYVER="2"
- BATCH=false PYVER="3"
- MANGLER=tcsh BATCH=true PYVER="3"
matrix:
# osx builds are often very slow to start due to high demand
fast_finish: true
Expand Down
32 changes: 14 additions & 18 deletions scripts/newinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ bootstrap_miniconda() {
miniconda::lsst_env "$LSST_PYTHON_VERSION" "$LSSTSW_REF"

CMD_SETUP_MINICONDA_SH="export PATH=\"${miniconda_path}/bin:\${PATH}\""
CMD_SETUP_MINICONDA_CSH="setenv PATH ${miniconda_path}/bin:\$PATH)"
CMD_SETUP_MINICONDA_CSH="setenv PATH ${miniconda_path}/bin:\$PATH"
}

#
Expand Down Expand Up @@ -646,23 +646,19 @@ generate_loader_csh() {
# Setup optional packages
${CMD_SETUP_MINICONDA_CSH}
set sourced=(\$_)
if ("\${sourced}" != "") then
# If not already initialized, set LSST_HOME to the directory where this
# script is located
set this_script = \${sourced[2]}
if ( ! \${?LSST_HOME} ) then
set LSST_HOME = \`dirname \${this_script}\`
set LSST_HOME = \`cd \${LSST_HOME} && pwd\`
endif
# Bootstrap EUPS
set EUPS_DIR = "\${LSST_HOME}/eups"
source "\${EUPS_DIR}/bin/setups.csh"
if ( ! \${?EUPS_PKGROOT} ) then
set EUPS_PKGROOT = "$EUPS_PKGROOT"
endif
# If not already initialized, set LSST_HOME to the directory where this
# script is located
if ( ! \${?LSST_HOME} ) then
set LSST_HOME = \`dirname \$0\`
set LSST_HOME = \`cd \${LSST_HOME} && pwd\`
endif
# Bootstrap EUPS
set EUPS_DIR = "\${LSST_HOME}/eups"
source "\${EUPS_DIR}/bin/setups.csh"
if ( ! \${?EUPS_PKGROOT} ) then
setenv EUPS_PKGROOT "$EUPS_PKGROOT"
endif
EOF
}
Expand Down

0 comments on commit cc644da

Please sign in to comment.