remove unnecessary menu
This commit is contained in:
parent
807c27a180
commit
360633523d
4 changed files with 10 additions and 47 deletions
|
@ -5,6 +5,6 @@ def entry():
|
|||
initialize()
|
||||
|
||||
# import should happen after the `initialize` function is called
|
||||
from src.interface.menu import menu
|
||||
from src.menu import menu
|
||||
|
||||
menu()
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
import inquirer
|
||||
|
||||
|
||||
class Choices:
|
||||
RUN_SETUP_SCRIPTS = "Run setup scripts"
|
||||
INSTALL_ARCH_LINUX = "Install Arch Linux"
|
||||
QUIT = "Quit"
|
||||
|
||||
|
||||
def menu():
|
||||
"""Show menu screen."""
|
||||
|
||||
print("\n")
|
||||
|
||||
questions = [
|
||||
inquirer.List(
|
||||
"menu",
|
||||
message="What would you like to do?",
|
||||
choices=[
|
||||
Choices.RUN_SETUP_SCRIPTS,
|
||||
Choices.INSTALL_ARCH_LINUX,
|
||||
Choices.QUIT,
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
choice = inquirer.prompt(questions)["menu"]
|
||||
|
||||
if choice == Choices.RUN_SETUP_SCRIPTS:
|
||||
from src.interface.choose_action import choose_action
|
||||
|
||||
choose_action()
|
||||
input("\nSetup complete! (press Enter to return to menu)")
|
||||
menu()
|
||||
elif choice == Choices.INSTALL_ARCH_LINUX:
|
||||
input("Work In Progress (press Enter to return to menu)")
|
||||
menu()
|
||||
elif choice == Choices.QUIT:
|
||||
# return to `setup.py` so it can exit safely
|
||||
return
|
||||
else:
|
||||
print(
|
||||
"""You should not have been able to reach this side of the code,
|
||||
yet here you are. Consider this an easter egg."""
|
||||
)
|
||||
exit(1)
|
|
@ -42,3 +42,12 @@ def choose_action():
|
|||
print("POST INStALL TASKS:")
|
||||
for post_install_task in post_install_tasks:
|
||||
print(f"- {post_install_task}")
|
||||
|
||||
|
||||
def menu():
|
||||
"""Show menu screen."""
|
||||
|
||||
print("\n")
|
||||
choose_action()
|
||||
input("\nSetup complete! (press Enter to return to menu)")
|
||||
menu()
|
Loading…
Add table
Add a link
Reference in a new issue