Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions archinstall/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import textwrap
import time
import traceback
from pathlib import Path

from archinstall.lib.args import arch_config_handler
from archinstall.lib.disk.utils import disk_layouts
Expand Down Expand Up @@ -62,6 +63,16 @@ def _fetch_arch_db() -> bool:
return True


def _list_scripts() -> str:
lines = ['The following are viable --script options:']

for file in (Path(__file__).parent / 'scripts').glob('*.py'):
if file.stem != '__init__':
lines.append(f' {file.stem}')

return '\n'.join(lines)


def run() -> int:
"""
This can either be run as the compiled and installed application: python setup.py install
Expand All @@ -72,6 +83,10 @@ def run() -> int:
arch_config_handler.print_help()
return 0

if arch_config_handler.get_script() == 'list':
print(_list_scripts())
return 0

if os.getuid() != 0:
print(tr('Archinstall requires root privileges to run. See --help for more.'))
return 1
Expand Down
10 changes: 0 additions & 10 deletions archinstall/scripts/list.py

This file was deleted.