Skip to content

Instantly share code, notes, and snippets.

@IlyasYOY
Created May 17, 2019 21:24
Show Gist options
  • Save IlyasYOY/2077a617353ad5efb4ee55e75fdff179 to your computer and use it in GitHub Desktop.
Save IlyasYOY/2077a617353ad5efb4ee55e75fdff179 to your computer and use it in GitHub Desktop.
install basic utils....
#!/bin/python3
from subprocess import run
from typing import List
def install_with(*command: List[str]):
print('Running "{}" ========================'.format(' '.join(command)))
result = run(command)
print('Command returned with status: {} ===='.format(result.returncode))
def install_with_snap(*command: List[str]):
install_with('snap', 'install', *command)
def install_with_apt(*command: List[str]):
install_with('apt', 'install', '-y', *command)
def install_oh_my_zsh():
print('Isntalling Oh, my Zsh! =============')
result = run(['sh', '-c', '"$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"'])
print('Installed with code: {}'.format(result.returncode))
def install_pyenv():
print('Installing pyenv ==============')
result = run(['sh', '-c', '"$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"'])
print('Installed with code: {}'.format(result.returncode))
def main():
print('Installing everything...')
install_with('apt', 'update')
install_with('apt', 'upgrade', '-y')
install_with_apt('zsh')
install_oh_my_zsh()
install_with_apt('vim')
install_with_apt('git')
install_pyenv()
install_with_apt('git-flow')
install_with_apt('default-jdk')
install_with_apt('cmake')
install_with_apt('geany')
install_with_snap('skype', '--classic')
install_with_snap('mailspring')
install_with_snap('docker')
install_with_snap('telegram-desktop')
install_with_snap('code', '--classic')
install_with_snap('go', '--classic')
install_with_snap('chromium')
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment