Skip to content

Commit

Permalink
Add variable set for (t)csh.
Browse files Browse the repository at this point in the history
  • Loading branch information
koning committed Sep 22, 2023
1 parent 5c2a85a commit b8e40b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion merlin/spec/specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,12 @@ def process_spec_defaults(self):
MerlinSpec.fill_missing_defaults(step["run"], defaults.STUDY_STEP_RUN)
# Insert VLAUNCHER specific variables if necessary
if "$(VLAUNCHER)" in step["run"]["cmd"]:
SHSET=""
if "csh" in step["run"]["shell"]:
SHSET="set "
for vlaunch_var, vlaunch_val in defaults.VLAUNCHER_VARS.items():
if vlaunch_var not in step["run"]["cmd"]:
step["run"]["cmd"] = f"{vlaunch_var}={vlaunch_val}\n" + step["run"]["cmd"]
step["run"]["cmd"] = f"{SHSET}{vlaunch_var}={vlaunch_val}\n" + step["run"]["cmd"]

# fill in missing merlin section defaults
MerlinSpec.fill_missing_defaults(self.merlin, defaults.MERLIN["merlin"])
Expand Down

0 comments on commit b8e40b3

Please sign in to comment.