help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamic menus - displaying a hash?


From: Mason Loring Bliss
Subject: Dynamic menus - displaying a hash?
Date: Mon, 30 Jan 2023 12:58:31 -0500

Hi all. I'm trying to figure out how to get a hash of the current config
file on-screen. So far my best bet appears to involve making a menuentry,
but I've hit a wall and I'd love advice:

The environment variable $config_file seems to go away after the menus are
rendered, but I can capture that:

    set meow=${config_file}

And I can even use that to get a hash, from the command line:

    hashsum --hash md5 $meow

...but I'd need the output of that in a variable to get it into a menu. The
closest I'm getting is this:

    set meow=${config_file}
    menuentry "Hash of $meow" "" {
        load_video
        hashsum --hash md5 $meow
        echo "Press any key to continue..."
        read
    }

...but I'd really love to have that hash substituted so it's on-screen as a
menu item, rather than having to select an item to get the hash computed.

Are there options I can pursue that'll do this? I don't see a way to
capture command output to a variable if there's not an explicit --set to do
it.

Thanks!

-- 
Mason Loring Bliss  ((   If I have not seen as far as others, it is because
 mason@blisses.org   ))   giants were standing on my shoulders. - Hal Abelson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]