Skip to content

Commit

Permalink
Added new startup scripts that don't blast existing ISIS environment … (
Browse files Browse the repository at this point in the history
#3927)

* Added new startup scripts that don't blast existing ISIS environment variables

* Update isisStartup.csh
  • Loading branch information
scsides authored Jun 29, 2020
1 parent f3fa359 commit 92e68f6
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
38 changes: 38 additions & 0 deletions isis/scripts/isisStartup.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/csh
################################################################################
# This file should be sourced within your current shell using the "source"
# command.
#
# On the command line type:
# > setenv ISISROOT ????
# > source isis3Startup.csh
#
# Replace the "????" in the above command line with the path you installed
# the Isis distribution
#
################################################################################

if ($?ISISROOT == 0) then
echo "ISISROOT environment variable is not set"
exit 1
endif

if ($?ISISDATA == 0) then
if (-d $ISISROOT/../data) then
setenv ISISDATA $ISISROOT/../isis_data
else
setenv ISISDATA /usgs/cpkgs/isis3/isis_data
endif
endif

if ($?ISISTESTDATA == 0) then
if (-d $ISISROOT/../testData) then
setenv ISISTESTDATA $ISISROOT/../testData
else
setenv ISISTESTDATA /usgs/cpkgs/isis3/isis_testData
endif
endif

if ( -f $ISISROOT/scripts/tabcomplete.csh ) then
source $ISISROOT/scripts/tabcomplete.csh;
endif
41 changes: 41 additions & 0 deletions isis/scripts/isisStartup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash
#
# This file should be executed within your current shell using the "." or "source"
# command.
#
# On the command line type:
# > set ISISROOT=????
# > . isis3Startup.sh
#
# Replace the "????" in the above command line with the path where you installed
# the Isis distribution
#
if [ ! "$ISISROOT" ]; then
ISISROOT=/usgs/pkgs/isis3/install
export ISISROOT
fi

if [ ! "$ISISDATA" ]; then
if [ -d $ISISROOT/../data ]; then
ISISDATA=$ISISROOT/../isis_data
else
ISISDATA=/usgs/cpkgs/isis3/isis_data
fi
export ISISDATA
fi

if [ ! "$ISISTESTDATA" ]; then
if [ -d $ISISROOT/../testData ]; then
ISISTESTDATA=$ISISROOT/../testData
else
ISISTESTDATA=/usgs/cpkgs/isis3/isis_testData
fi
export ISISTESTDATA
fi

if [ "$PATH" ]; then
PATH="${PATH}:${ISISROOT}/bin"
else
PATH="$ISISROOT/bin"
fi
export PATH

0 comments on commit 92e68f6

Please sign in to comment.