-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·35 lines (29 loc) · 751 Bytes
/
install
File metadata and controls
executable file
·35 lines (29 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/env python3
from glob import glob
from os.path import isfile
import fedora, ubuntu, zsh, nvim, fonts, npm, ssh, git
def check_distro():
release_info = ''
for file in glob('/etc/*-release'):
if isfile(file):
with open(file, 'r') as file_object:
release_info += file_object.read()
release_info = release_info.lower()
if 'ubuntu' in release_info:
return 'ubuntu'
if 'fedora' in release_info:
return 'fedora'
def install():
linux_distro = check_distro()
if linux_distro == 'fedora':
fedora.install()
elif linux_distro == 'ubuntu':
ubuntu.install()
zsh.install()
nvim.install()
fonts.install()
npm.configure()
ssh.configure()
git.configure()
if __name__ == '__main__':
install()