Skip to content

Commit e009857

Browse files
committed
addressed @remram44 suggestion
adds a message when UVCDAT was already sourced at the current location
1 parent 7b274e7 commit e009857

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

CMake/cdat_modules_extra/setup_runtime.csh.in

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ endif
2222
# which can lead to errors.
2323
if ( $?UVCDAT_SETUP_PATH ) then
2424
if ( ${UVCDAT_SETUP_PATH} == ${install_prefix} ) then
25-
echo 'UVCDAT setup already sourced for this install location.'
25+
echo 'Nothing to do UVCDAT is already setup at '${UVCDAT_SETUP_PATH}
2626
exit 1
2727
else
2828
echo 'ERROR: UVCDAT setup was previously sourced at '${UVCDAT_SETUP_PATH}
29-
echo 'Open a new shell in order to use a different install location.'
29+
echo 'ERROR: There is no need to run setup_runtime manually anymore.'
30+
echo 'ERROR: Open a new shell in order to use a different install location.'
3031
exit 1
3132
endif
3233
endif
@@ -91,7 +92,7 @@ setenv UVCDAT_SETUP_PATH ${install_prefix}
9192

9293
unset install_prefix
9394

94-
echo "Successfully updated your environment to use UV-CDAT"
95-
echo "(changes are valid for this session/terminal only)"
96-
echo "Version: "${UVCDAT_PROMPT_STRING}
97-
echo "Location: "${UVCDAT_SETUP_PATH}
95+
echo 'Successfully updated your environment to use UV-CDAT'
96+
echo '(changes are valid for this session/terminal only)'
97+
echo 'Version: '${UVCDAT_PROMPT_STRING}
98+
echo 'Location: '${UVCDAT_SETUP_PATH}

CMake/cdat_modules_extra/setup_runtime.sh.in

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ function cleanup {
1010
# which can lead to errors.
1111
if [ -n "${UVCDAT_SETUP_PATH}" ] ; then
1212
if [ "${UVCDAT_SETUP_PATH}" = "${install_prefix}" ] ; then
13+
echo "Nothing to do UVCDAT is already setup at "${UVCDAT_SETUP_PATH} 1>&2
1314
cleanup
1415
return 0
1516
else
16-
echo "ERROR: UVCDAT setup was previously sourced at \"${UVCDAT_SETUP_PATH}\"" 1>&2
17+
echo "ERROR: UVCDAT setup was previously sourced at "${UVCDAT_SETUP_PATH} 1>&2
1718
echo "ERROR: There is no need to run setup_runtime manually anymore." 1>&2
1819
echo "ERROR: Open a new shell in order to use a different install location." 1>&2
1920
cleanup
@@ -85,8 +86,8 @@ export PYTHONPATH
8586

8687
export UVCDAT_SETUP_PATH="${install_prefix}"
8788
cleanup
88-
echo "Successfully updated your environment to use UV-CDAT"
89-
echo "(changes are valid for this session/terminal only)"
90-
echo "Version: "${UVCDAT_PROMPT_STRING}
91-
echo "Location: "${UVCDAT_SETUP_PATH}
89+
echo "Successfully updated your environment to use UV-CDAT" 1>&2
90+
echo "(changes are valid for this session/terminal only)" 1>&2
91+
echo "Version: "${UVCDAT_PROMPT_STRING} 1>&2
92+
echo "Location: "${UVCDAT_SETUP_PATH} 1>&2
9293
return 0

0 commit comments

Comments
 (0)