Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py6
-rw-r--r--examples/only_hd.py10
-rw-r--r--examples/swiss.py13
3 files changed, 22 insertions, 7 deletions
diff --git a/examples/guided.py b/examples/guided.py
index d2447341..37f4cf72 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -3,6 +3,7 @@ import os
import time
import archinstall
+from archinstall import ConfigurationOutput
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -257,7 +258,10 @@ if not archinstall.arguments.get('offline', False):
if not archinstall.arguments.get('silent'):
ask_user_questions()
-archinstall.output_configs(archinstall.arguments,show=False if archinstall.arguments.get('silent') else True)
+config_output = ConfigurationOutput(archinstall.arguments)
+if not archinstall.arguments.get('silent'):
+ config_output.show()
+config_output.save()
if archinstall.arguments.get('dry_run'):
exit(0)
diff --git a/examples/only_hd.py b/examples/only_hd.py
index 5d081b14..76a616db 100644
--- a/examples/only_hd.py
+++ b/examples/only_hd.py
@@ -4,6 +4,8 @@ import os
import pathlib
import archinstall
+from archinstall import ConfigurationOutput
+
class OnlyHDMenu(archinstall.GlobalMenu):
def _setup_selection_menu_options(self):
@@ -23,7 +25,7 @@ class OnlyHDMenu(archinstall.GlobalMenu):
self.enable(entry)
else:
self.option(entry).set_enabled(False)
- self._update_install()
+ self._update_install_text()
def _missing_configs(self):
""" overloaded method """
@@ -122,7 +124,11 @@ if not archinstall.check_mirror_reachable():
if not archinstall.arguments.get('silent'):
ask_user_questions()
-archinstall.output_configs(archinstall.arguments,show=False if archinstall.arguments.get('silent') else True)
+
+config_output = ConfigurationOutput(archinstall.arguments)
+if not archinstall.arguments.get('silent'):
+ config_output.show()
+config_output.save()
if archinstall.arguments.get('dry_run'):
exit(0)
diff --git a/examples/swiss.py b/examples/swiss.py
index 4eb51a05..cf864ed5 100644
--- a/examples/swiss.py
+++ b/examples/swiss.py
@@ -19,6 +19,7 @@ import time
import pathlib
import archinstall
+from archinstall import ConfigurationOutput
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -248,10 +249,10 @@ class MyMenu(archinstall.GlobalMenu):
self.enable(entry)
else:
self.option(entry).set_enabled(False)
- self._update_install()
+ self._update_install_text()
def post_callback(self,option,value=None):
- self._update_install(self._execution_mode)
+ self._update_install_text(self._execution_mode)
def _missing_configs(self,mode='full'):
def check(s):
@@ -271,7 +272,7 @@ class MyMenu(archinstall.GlobalMenu):
return f'Instalation ({missing} config(s) missing)'
return 'Install'
- def _update_install(self,mode='full'):
+ def _update_install_text(self, mode='full'):
text = self._install_text(mode)
self.option('install').update_description(text)
@@ -492,7 +493,11 @@ mode = archinstall.arguments.get('mode', 'full').lower()
if not archinstall.arguments.get('silent'):
ask_user_questions(mode)
-archinstall.output_configs(archinstall.arguments,show=False if archinstall.arguments.get('silent') else True)
+config_output = ConfigurationOutput(archinstall.arguments)
+if not archinstall.arguments.get('silent'):
+ config_output.show()
+config_output.save()
+
if archinstall.arguments.get('dry_run'):
exit(0)
if not archinstall.arguments.get('silent'):