File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import textwrap
77import time
88import traceback
9+ from pathlib import Path
910
1011from archinstall .lib .args import arch_config_handler
1112from archinstall .lib .disk .utils import disk_layouts
@@ -62,6 +63,16 @@ def _fetch_arch_db() -> bool:
6263 return True
6364
6465
66+ def _list_scripts () -> str :
67+ lines = ['The following are viable --script options:' ]
68+
69+ for file in (Path (__file__ ).parent / 'scripts' ).glob ('*.py' ):
70+ if file .stem != '__init__' :
71+ lines .append (f' { file .stem } ' )
72+
73+ return '\n ' .join (lines )
74+
75+
6576def run () -> int :
6677 """
6778 This can either be run as the compiled and installed application: python setup.py install
@@ -72,6 +83,10 @@ def run() -> int:
7283 arch_config_handler .print_help ()
7384 return 0
7485
86+ if arch_config_handler .get_script () == 'list' :
87+ print (_list_scripts ())
88+ return 0
89+
7590 if os .getuid () != 0 :
7691 print (tr ('Archinstall requires root privileges to run. See --help for more.' ))
7792 return 1
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments