Skip to content

Instantly share code, notes, and snippets.

@BrettMayson
Last active October 5, 2017 10:30
Show Gist options
  • Save BrettMayson/860eb64803f05fc1de882efbaf5ee5b8 to your computer and use it in GitHub Desktop.
Save BrettMayson/860eb64803f05fc1de882efbaf5ee5b8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import urllib.request
import os
print("Downloading Installer")
url = "http://dl.4players.de/ts/releases/3.1.6/TeamSpeak3-Client-linux_amd64-3.1.6.run"
os.makedirs(os.path.expanduser("~/.teamspeak"))
os.chdir(os.path.expanduser("~/.teamspeak"))
urllib.request.urlretrieve(url,os.path.expanduser('~/.teamspeak/setup.run'))
os.system('chmod +x setup.run')
os.system('./setup.run')
os.system('mv TeamSpeak3-Client-linux_amd64 ts3')
print("Downloading Icon")
icon = "https://wiki-en.ckras.com/wiki/images/a/ae/Teamspeak.png"
urllib.request.urlretrieve(icon,os.path.expanduser('~/.teamspeak/icon.png'))
with open(os.path.expanduser("~/.local/share/applications/teamspeak.desktop"),'w') as f:
f.write("[Desktop Entry]\n")
f.write("Name=TeamSpeak 3\n")
f.write("Terminal=false\n")
f.write("Type=Application\n")
f.write("Icon="+os.path.expanduser("~/.teamspeak/icon.png")+"\n")
f.write("Exec="+os.path.expanduser("~/.teamspeak/ts3/ts3client_runscript.sh\n"))
os.system("killall unity-scope-home")
print("All Done!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment