-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
57 lines (51 loc) · 1.96 KB
/
main.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import subprocess
import sys
doExit = 0
while doExit == 0:
print("""
|---------------------------------------------------------|
| Welcome to Louis' Fedora Post-Install CLI |
|---------------------------------------------------------|
| Select one of the options below by entering its number |
| |
| 1. Update System |
| 2. Enable RPM Fusion and Flathub Repositories |
| 3. Install Media Codecs |
| 4. Install Programs |
| 5. Tweak Settings |
|---------------------------------------------------------|
| 6. Exit Program |
|---------------------------------------------------------|
""")
userInput = input(">")
if userInput == "1":
print("Running update script...")
subprocess.call("/opt/postinstall/functions/update.sh")
elif userInput == "2":
print("Enabling extra repositories...")
subprocess.call("/opt/postinstall/functions/repo.sh")
elif userInput == "3":
print("Installing restricted media codecs...")
subprocess.call("/opt/postinstall/functions/codec.sh")
elif userInput == "4":
print("Installing chosen programs...")
subprocess.call("/opt/postinstall/functions/apps.sh")
elif userInput == "5":
print("Applying configuration tweaks...")
subprocess.call("/opt/postinstall/functions/config.sh")
elif userInput == "6":
print("Exiting...")
sys.exit()
else:
print("Invalid Input, try again")
print("Do other operation? (y/n)")
exitChoice = input(">")
if exitChoice == "y":
doExit = 0
elif exitChoice == "n":
doExit = 1
print("Exiting...")
else:
print("Invalid input, exiting anyway")
doExit = 1
print("Exiting...")