Skip to content
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

Copy gmt.conf if movie or batch detects one in current directory #4781

Merged
merged 2 commits into from Feb 10, 2021

Conversation

PaulWessel
Copy link
Member

Description of proposed changes

This PR seeks to let batch and movie be able to use any gmt.conf files found in the directory when these commands are run. The reason we need to do something specific is that the GMT commands contained in the scripts are run in different directories than where batch or movie starts. Thus, we must actually place the gmt.conf file in all the directories where the scripts are run form. The algorithm implement is this:

  1. If gmt.conf is found in the current directory then we keep the full path to this file in a variable
  2. As we build the pre/post-flight and parallel scripts from input scripts we check if gmt begin is given the -C option, and if not then we copy in the gmt.conf it it was found in step 1.

The documentation has been updated and also points out that users cannot use the preflight script to create a gmt.conf since it will be created in a hidden directory that is deleted upon completion.

If there is a gmt.conf file at the top directory where movie or batch is launched then we will copy that file into the temporary directories used to running all scripts, including the preflight and postflight scripts.
@PaulWessel PaulWessel self-assigned this Feb 9, 2021
@PaulWessel PaulWessel changed the title Conf copy Copy gmt.conf if movie or batch detects on in current directory Feb 9, 2021
@PaulWessel PaulWessel changed the title Copy gmt.conf if movie or batch detects on in current directory Copy gmt.conf if movie or batch detects one in current directory Feb 9, 2021
@PaulWessel PaulWessel merged commit 20e279d into master Feb 10, 2021
@PaulWessel PaulWessel deleted the conf-copy branch February 10, 2021 00:15
@gd-a
Copy link
Contributor

gd-a commented Feb 10, 2021

If I may add, It's the same problem with the cpt file :)

except we can link it manually ...

@PaulWessel
Copy link
Member Author

Yes, it may be - I will look at that. The complication is that many will use -W to place the temporary stuff in on a temporary disk and then it is not in ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants