From cc806d9c4ce29212c2848c15b4b184feace3e1ac Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 21 Nov 2023 14:34:30 +0100 Subject: Started a re-write of the docs (#1967) * Started a re-write of the docs, using CSV for tables and re-organizing parameter definitions * Added final config options in --config, some have external references which needs to be populated * Forgot to escape a comma * Clarified a note * Added disk configuration and disk encryption docs * Changed way of installing using source and python * Added a 'list script' that lists available scripts. This could be converted to a argparse later. But this does the trick for now. And it's added to ease documentation and listing of available options. * Added a 'Known issues' section, as well as renamed the issues tab * Finished up the known issues section * Added a section regarding --plugin * Added plugin description, tweaked disk_config to the latest changes from #2221 * Added custom-commands docs, and improved some creds and known issue links --- archinstall/__init__.py | 3 ++- archinstall/scripts/list.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 archinstall/scripts/list.py (limited to 'archinstall') diff --git a/archinstall/__init__.py b/archinstall/__init__.py index b9a0c2fb..67230c71 100644 --- a/archinstall/__init__.py +++ b/archinstall/__init__.py @@ -1,6 +1,7 @@ """Arch Linux installer - guided, templates etc.""" import importlib import os +import sys import time import traceback from argparse import ArgumentParser, Namespace @@ -58,7 +59,7 @@ debug(f"Graphics devices detected: {SysInfo._graphics_devices().keys()}") # For support reasons, we'll log the disk layout pre installation to match against post-installation layout debug(f"Disk states before installing: {disk.disk_layouts()}") -if os.getuid() != 0: +if 'sphinx' not in sys.modules and os.getuid() != 0: print(_("Archinstall requires root privileges to run. See --help for more.")) exit(1) diff --git a/archinstall/scripts/list.py b/archinstall/scripts/list.py new file mode 100644 index 00000000..0e0363a1 --- /dev/null +++ b/archinstall/scripts/list.py @@ -0,0 +1,10 @@ +import glob +import pathlib + +print("The following are viable --script options:") + +for script in [pathlib.Path(x) for x in glob.glob(f"{pathlib.Path(__file__).parent}/*.py")]: + if script.stem in ['__init__', 'list']: + continue + + print(f" {script.stem}") \ No newline at end of file -- cgit v1.2.3-54-g00ecf