-
Notifications
You must be signed in to change notification settings - Fork 65
Added message in setup_runtime scripts #1226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
7b274e7
e009857
7226d92
5731c43
aed46d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,11 +22,12 @@ endif | |
| # which can lead to errors. | ||
| if ( $?UVCDAT_SETUP_PATH ) then | ||
| if ( ${UVCDAT_SETUP_PATH} == ${install_prefix} ) then | ||
| echo 'UVCDAT setup already sourced for this install location.' | ||
| echo 'Nothing to do UVCDAT is already setup at '${UVCDAT_SETUP_PATH} | ||
| exit 1 | ||
| else | ||
| echo 'ERROR: UVCDAT setup was previously sourced at '${UVCDAT_SETUP_PATH} | ||
| echo 'Open a new shell in order to use a different install location.' | ||
| echo 'ERROR: There is no need to run setup_runtime manually anymore.' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would not mark it as error instead use INFO:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok changing this but using exit 0 then rather than exit 1 |
||
| echo 'ERROR: Open a new shell in order to use a different install location.' | ||
| exit 1 | ||
| endif | ||
| endif | ||
|
|
@@ -91,3 +92,7 @@ setenv UVCDAT_SETUP_PATH ${install_prefix} | |
|
|
||
| unset install_prefix | ||
|
|
||
| echo 'Successfully updated your environment to use UV-CDAT' | ||
| echo '(changes are valid for this session/terminal only)' | ||
| echo 'Version: '${UVCDAT_PROMPT_STRING} | ||
| echo 'Location: '${UVCDAT_SETUP_PATH} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,10 +10,11 @@ function cleanup { | |
| # which can lead to errors. | ||
| if [ -n "${UVCDAT_SETUP_PATH}" ] ; then | ||
| if [ "${UVCDAT_SETUP_PATH}" = "${install_prefix}" ] ; then | ||
| echo "Nothing to do UVCDAT is already setup at "${UVCDAT_SETUP_PATH} 1>&2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quotes are wrong
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why can't the var be outside the quotes?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually per: http://wiki.bash-hackers.org/syntax/quoting the quotes are probably not even needed here...
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i definitely don't want the quotes in the output, and since we are doing an echo of strings the quotes are actually not necessary. What I have in there is right. But I really don't care and we want to keep @remram44 happy so I will push an update right away with the quotes around the var. |
||
| cleanup | ||
| return 0 | ||
| else | ||
| echo "ERROR: UVCDAT setup was previously sourced at \"${UVCDAT_SETUP_PATH}\"" 1>&2 | ||
| echo "ERROR: UVCDAT setup was previously sourced at "${UVCDAT_SETUP_PATH} 1>&2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quotes were right and are now wrong?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| echo "ERROR: There is no need to run setup_runtime manually anymore." 1>&2 | ||
| echo "ERROR: Open a new shell in order to use a different install location." 1>&2 | ||
| cleanup | ||
|
|
@@ -85,4 +86,8 @@ export PYTHONPATH | |
|
|
||
| export UVCDAT_SETUP_PATH="${install_prefix}" | ||
| cleanup | ||
| echo "Successfully updated your environment to use UV-CDAT" 1>&2 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use UV-CDAT or UVCDAT but not both. Earlier you used UVCDAT |
||
| echo "(changes are valid for this session/terminal only)" 1>&2 | ||
| echo "Version: "${UVCDAT_PROMPT_STRING} 1>&2 | ||
| echo "Location: "${UVCDAT_SETUP_PATH} 1>&2 | ||
| return 0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
'Nothing to do since UVCDAT is already setup at '${UVCDAT_SETUP_PATH}