[arch-releng] [PATCH 3/3] Prompt user to pick a bootloader in interactive_select_packages and select the proper package for installation.

C Anthony Risinger anthony at extof.me
Tue Feb 22 00:11:21 EST 2011


On Mon, Feb 21, 2011 at 9:34 PM, C Anthony Risinger <anthony at extof.me> wrote:
>
> store heredoc in variable (best of both examples, at cost of `cat`
> call and subshell):
>
> opts=$(cat <<EOF
> ...
> EOF)

... and something else just for grins :-) as i didn't think of it
until right after i sent my msg ...

---------------------------------
read -rd $'\0' opts <<EOF
grub=A nice long explantaion about grub :-)
syslinux=And that's why we are teh awesome!
insert_here=I'm just along for the ride
EOF

echo "$opts"
---------------------------------

that will store the entire heredoc into $opts (remember to use quotes
for output of course); since null is used as a delimiter, and bash
variables/strings are not capable of storing null, this guarantees the
entire doc will be in `$opts`.

it really is ridiculous what bash is capable of ... anyways, carry on,
nothing to see here.

C Anthony


More information about the arch-releng mailing list