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

#212 Make compile and checkout scripts executable #220

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion fre/make/gfdlfremake/buildBaremetal.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ def writeScript(self):
self.f.write(self.make+"\n")
self.f.close()

# Make compile script executable
os.chmod(self.bld+"/compile.sh", 0o744)

## TODO run as a batch job on the login cluster
def run(self):
"""
Expand All @@ -118,7 +121,6 @@ def run(self):
- self : The dockerfile object
"""
###### TODO make the Makefile
os.chmod(self.bld+"/compile.sh", 0o744)
command = [self.bld+"/compile.sh","|","tee",self.bld+"/log.compile"]
try:
subprocess.run(args=command, check=True)
Expand Down
4 changes: 3 additions & 1 deletion fre/make/gfdlfremake/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,16 @@ def finish (self,pc):
else:
self.checkoutScript.close()

# Make checkout script executable
os.chmod(self.src+"/"+self.fname, 0o744)

## TODO: batch script building
def run (self):
"""
Brief: Changes the permission on the checkout script and runs it
Param:
- self The checkout script object
"""
os.chmod(self.src+"/"+self.fname, 0o744)
try:
subprocess.run(args=[self.src+"/"+self.fname], check=True)
except:
Expand Down