Skip to content

Commit

Permalink
Merge pull request #37 from FranciscodeMaussion/master
Browse files Browse the repository at this point in the history
Add alt command for grub-update
  • Loading branch information
mateosss authored Jul 18, 2020
2 parents 9a32308 + a5c8527 commit 1e48167
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions matter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 1e48167

Please sign in to comment.