Skip to content

Commit

Permalink
Added permission fixes to viewer install
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjay-Ganeshan committed Jan 14, 2018
1 parent 303e2a8 commit 5afd673
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
working_dir
replay*
viewer_latest*
viewer_currentInstall.json
15 changes: 15 additions & 0 deletions install_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,21 @@ def main():
print("Cleaning up downloads...")
os.remove(downloadLocation)
print("Cleaned up")
try:
if currentInfo['system'] == 'Linux32':
print("Fixing permissions...You'll need to provide elevated privileges for this to work.")
os.system("sudo chmod 777 viewer_latest/Linux32/battleclient18.x86")
print("Done fixing permissions!")
elif currentInfo['system'] == 'Linux64':
print("Fixing permissions...You'll need to provide elevated privileges for this to work.")
os.system("sudo chmod 777 viewer_latest/Linux64/battleclient18.x86_64")
print("Done fixing permissions!")
if currentInfo['system'] == 'Mac':
print("Fixing permissions...You'll need to provide elevated privileges for this to work.")
os.system("sudo chmod -R 777 viewer_latest/Mac/battleclient18.app")
print("Done fixing permissions!")
except:
pass
print("Updating current version number...")
newInfo = {}
newInfo['version'] = latestVersion
Expand Down

0 comments on commit 5afd673

Please sign in to comment.