* Work around an apparent bug in Bash 4.0. It no longer accepts this:

echo $(cat <<EOF
    bla
    EOF)

  It does accept backticks:

    echo `cat <<EOF
    bla
    EOF`

svn path=/nixos/trunk/; revision=15192
This commit is contained in:
Eelco Dolstra 2009-04-20 16:26:50 +00:00
parent ed43363e2a
commit 453e9abc9e

View File

@ -37,9 +37,9 @@ fi
configurationCounter=0
configurationLimit="@configurationLimit@"
numAlienEntries=$(cat <<EOF | egrep '^[[:space:]]*title' | wc -l
numAlienEntries=`cat <<EOF | egrep '^[[:space:]]*title' | wc -l
@extraGrubEntries@
EOF)
EOF`
if test $((configurationLimit+numAlienEntries)) -gt 190; then
configurationLimit=$((190-numAlienEntries));
@ -114,10 +114,10 @@ if test -n "@copyKernels@"; then
fi
# Additional entries specified verbatim by the configuration.
extraGrubEntries=$(cat <<EOF
extraGrubEntries=`cat <<EOF
@extraGrubEntries@
EOF
)
EOF`
if test -n "@extraGrubEntriesBeforeNixos@"; then
echo "$extraGrubEntries" >> $tmp