Skip to content

Commit

Permalink
protect also top-level
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangWaltenberger committed Feb 1, 2024
1 parent 4c7d5f5 commit d23a7b5
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions smodels/lib/pythia8/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,24 +150,20 @@ def protectInstall():
many pythia8 instances in parallel, for some reason they sometimes deleted
files from the install, making the install unusable """
# print ( f"fixACLs: {os.getcwd()}" )
with open("pythiaversion","rt" ) as f:
pythiaversion = f.read().strip()
f.close()
cmd = f"chmod -R a-w pythia{pythiaversion}"
# pythiaversion = getVersion()
#cmd = f"chmod -R a-w pythia{pythiaversion}"
cmd = f"chmod -R a-w ."
import subprocess
subprocess.getoutput ( cmd )
print ( f"made pythia{pythiaversion} readonly" )
print ( f"made pythia8 readonly" )

def removeInstallProtection():
""" make install writable and removable again """
# print ( f"fixACLs: {os.getcwd()}" )
with open("pythiaversion","rt" ) as f:
pythiaversion = f.read().strip()
f.close()
cmd = f"chmod -R u+w pythia{pythiaversion}"
# pythiaversion = getVersion()
cmd = f"chmod -R u+w ."
import subprocess
subprocess.getoutput ( cmd )
print ( f"made pythia{pythiaversion} writable" )
print ( f"made pythia8 writable" )


def installPythia():
Expand Down

0 comments on commit d23a7b5

Please sign in to comment.