Gentoo Archives: gentoo-catalyst

From: "W. Trevor King" <wking@×××××××.us>
To: Catalyst <gentoo-catalyst@l.g.o>
Cc: Matt Turner <mattst88@g.o>, "W. Trevor King" <wking@×××××××.us>
Subject: [gentoo-catalyst] [PATCH] kmerge.sh: Fix line wrapping typo from 9ceebbf
Date: Fri, 01 Mar 2013 05:57:49
Message-Id: 11de1a8a9dadcfe6f408a3b0f868db6940931af1.1362117274.git.wking@tremily.us
In Reply to: [gentoo-catalyst] [PATCH 6/6] kmerge.sh: Make /var/tmp/${clst_kname}.config optional by "W. Trevor King"
1 From: "W. Trevor King" <wking@×××××××.us>
2
3 In 9ceebbf (kmerge.sh: Make /var/tmp/${clst_kname}.config optional,
4 2013-02-09), I added a KERNCACHE check to a `[` test, wrapping the two
5 clauses in the test to avoid a very long line. Unfortunately,
6 newlines do not appear to be legal in this position. For example:
7
8 $ if [ -n "a" -a
9 > -n "b" ]; then echo "c"; fi
10 bash: [: missing `]'
11 bash: -n: command not found
12
13 This commit fixes the error by explicitly wrapping the line with a
14 backslash.
15 ---
16 targets/support/kmerge.sh | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
20 index ce1dddf..e78e0b4 100644
21 --- a/targets/support/kmerge.sh
22 +++ b/targets/support/kmerge.sh
23 @@ -180,7 +180,7 @@ then
24 fi
25
26 CONFIG_MATCH=0
27 -if [ -n "${clst_KERNCACHE}" -a
28 +if [ -n "${clst_KERNCACHE}" -a \
29 -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ]
30 then
31 if [ ! -e /var/tmp/${clst_kname}.config ]
32 --
33 1.8.2.rc0.16.g20a599e

Replies