Skip to content

Commit

Permalink
enhanced the upgrade function
Browse files Browse the repository at this point in the history
  • Loading branch information
k4yt3x committed Mar 30, 2018
1 parent 77fdb78 commit f14e0a5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,16 @@ def check_version(self, VERSION):
break
avalon.subLevelTimeInfo('Server version: ' + server_version)
if server_version > VERSION:
avalon.info('Here\'s a newer version of SCUTUM!')
avalon.info('There\'s a newer version of SCUTUM!')
if avalon.ask('Update to the newest version?'):
self.install()
script_url = 'https://raw.githubusercontent.com/K4YT3X/SCUTUM/master/quickinstall.sh'
if not os.system("which curl"):
os.system("sudo sh -c \"$(curl -fsSL {})\"".format(script_url))
elif not os.system("which wget"):
os.system("sudo sh -c \"$(wget {} -O -)\"".format(script_url))
else:
urllib.request.urlretrieve(script_url, '/tmp/quickinstall.sh')
os.system('sudo bash /tmp/quickinstall.sh')
else:
avalon.warning('Ignoring update')
else:
Expand Down

0 comments on commit f14e0a5

Please sign in to comment.