-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
instead of strings in the python files, it will be better to have these stored as actual bash scripts for easier readability Signed-off-by: vsoch <vsoch@users.noreply.github.com> Co-authored-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
205 additions
and
179 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2023 Lawrence Livermore National Security, LLC and other | ||
# HPCIC DevTools Developers. See the top-level COPYRIGHT file for details. | ||
# | ||
# SPDX-License-Identifier: (MIT) | ||
|
||
import os | ||
|
||
import fluxburst.utils as utils | ||
|
||
here = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
|
||
def get_script(name, replace): | ||
""" | ||
Get a template file by name and replace a set of strings. | ||
""" | ||
template_file = os.path.join(here, name) | ||
if not os.path.exists(template_file): | ||
raise ValueError(f"{template_file} does not exist") | ||
template = utils.read_file(template_file) | ||
for key, value in replace.items(): | ||
template = template.replace(key, value) | ||
return template |
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
Oops, something went wrong.