Created
August 18, 2020 19:39
-
-
Save Chaspen/fd02b7be51c82e2b0ec3c392244a187f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, re | |
def main(): | |
userEnter = input("What distro do you use?: ") | |
distrosDeb = ["ubuntu", "kubuntu", "lubuntu", | |
"xubuntu", "debian", "deepin", | |
"raspbian", "parrot", "sparky", | |
"mint", "popos", "elementaryos"] | |
distrosArch = ["arch", "manjaro", "chakra", | |
"archbang", "parabola", | |
"endeavouros", "archlabs"] | |
distrosFed = ["fedora", "centos", "redhat"] | |
pacmanPackages = ["i3", "polybar", "go", "lua", ""] | |
pkgArch = " ".join(pacmanPackages) | |
#ubuntu | |
if userEnter in distrosDeb: | |
print("Your distro uses APT, is that correct?") | |
yn = input() | |
if yn == "y": | |
print("Ok, downloading packages...") | |
os.system("sudo pacman -S " + pkgArch ) | |
elif yn == "n": | |
print("Canceling...") | |
os.system("clear") | |
main() | |
#arch | |
elif userEnter in distrosArch: | |
print("Your distro uses Pacman, is that correct?") | |
yn = input() | |
if yn == "y": | |
print("Ok, downloading packages...") | |
os.system("sudo apt-get install " + pkgDeb ) | |
elif yn == "n": | |
print("Canceling...") | |
os.system("clear") | |
main() | |
#fedora | |
elif userEnter in distrosFed: | |
print("Your distro uses RPM, is that correct?") | |
yn = input() | |
if yn == "y": | |
print("Ok, downloading packages...") | |
os.system("rpm -i " + pkgFed ) | |
elif yn == "n": | |
print("Canceling...") | |
os.system("clear") | |
main() | |
#others | |
elif userEnter == "void": | |
print("Your distro is Void, is that correct?") | |
yn = input() | |
if yn == "y": | |
print("Ok, downloading packages...") | |
os.system("rpm -i " + pkgVoid ) | |
elif yn == "n": | |
print("Canceling...") | |
os.system("clear") | |
main() | |
#solus | |
elif userEnter == "solus": | |
print("Your distro is Solus, is that correct?") | |
yn = input() | |
if yn == "y": | |
print("Ok, downloading packages...") | |
os.system("rpm -i " + pkgVoid ) | |
elif yn == "n": | |
print("Canceling...") | |
os.system("clear") | |
main() | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment