From a5c8527e9844363a85e72726fe0cc68f9d399abd Mon Sep 17 00:00:00 2001 From: Francisco de Maussion Date: Tue, 14 Jul 2020 14:38:30 -0300 Subject: [PATCH] Add alt command for grub-update --- matter.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/matter.py b/matter.py index b97b970..bad3f64 100755 --- a/matter.py +++ b/matter.py @@ -399,10 +399,15 @@ def copy_source_to_target(): def update_grub_cfg(): COMMAND = "update-grub" - info(f"Remake grub.cfg with {COMMAND}") - if not has_command(COMMAND): - error(f"{COMMAND} command not found in your system") - sh(COMMAND) + ALT_COMMAND = "grub-mkconfig" + info(f"Update grub.cfg") + command = COMMAND + if not has_command(command): + if not has_command(ALT_COMMAND): + error(f"{COMMAND} and {ALT_COMMAND} command not found in your system") + command = f"{ALT_COMMAND} -o {GRUB_CFG_PATH}" + info(f"Remake grub.cfg with {command}") + sh(command) def update_grub_defaults():