-
Notifications
You must be signed in to change notification settings - Fork 146
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
Expand environment variable in file names for C++ apps #600
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blakewalters
approved these changes
Jun 1, 2020
rtownson
approved these changes
Aug 12, 2020
ftessier
force-pushed
the
feature-expand-envvars
branch
from
August 19, 2020 15:42
45249b8
to
f210bac
Compare
Rebased on |
ftessier
approved these changes
Aug 19, 2020
Travis seems down, but I have checked locally that compilation is successful and that there is no conflict when rebasing on |
ftessier
force-pushed
the
feature-expand-envvars
branch
from
August 19, 2020 16:15
f210bac
to
f1240f8
Compare
Can't merge until Travis completes. Will do then. |
Add an egs++ egsExpandPath global function to expand the FIRST environment variable found anywhere in its string argument: - Expands Linux or Windows style environment variable - Expands the environment variable - Appends folder separator if missing - Replaces backslashes with slashes - Removes duplicate slashes in the expanded path This function assumes that there is only one environment variable in the absolute file path, and that it is a directory.
ftessier
force-pushed
the
feature-expand-envvars
branch
from
August 19, 2020 23:32
f1240f8
to
c108576
Compare
Rebased on |
ftessier
force-pushed
the
feature-expand-envvars
branch
from
August 20, 2020 03:12
c108576
to
438d020
Compare
ftessier
changed the title
Feature expand environment variable in file names for C++ apps
Expand environment variable in file names for C++ apps
Apr 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces the C++ EGSnrc global function
egsExpandPath
to search for one environment variable anywhere in the string argument and expand it with its value. It understands Unix ($VAR
) and Windows (%VAR%
) environment variables, as well as their file separators (backslash or slash). However the file name is output using slashes as file separators. Consequently:$EGS_HOME
or$HEN_HOUSE
This feature matches the functionality already existing for Mortran apps although with added flexibility.