Skip to content

Commit adb7a45

Browse files
Scripts/generate-derived-sources.sh: line 19: [: binary operator expected while building Source/WebKit
https://bugs.webkit.org/show_bug.cgi?id=228908 Patch by Kimmo Kinnunen <[email protected]> on 2021-08-10 Reviewed by Per Arne Vollan. Source/JavaScriptCore: * Scripts/generate-derived-sources.sh: Quote the use of CC so that future copy-paste does not make the same mistake as this bug. Source/WebCore: * Scripts/generate-derived-sources.sh: Quote the use of CC so that future copy-paste does not make the same mistake as this bug. Source/WebKit: Change variable references in the sh script to quoted "$VAR". [ -z $VAR ] with VAR="a b" would mean [ -z a b ]. -z is unary operator, so the expression b would be in position where test would expect an operator. The correct form is [ -z "a b" ]. In general, sh scripts usually refer to variables using quotes. * Scripts/generate-derived-sources.sh: Fix a bug where multiple space separated paths in WEBKITADDITIONS_HEADER_SEARCH_PATHS would cause test expression to receive arguments after the -z arg. Quote the use of CC so future copy-paste does not make the same mistake as this bug. Tools: * DumpRenderTree/Scripts/generate-derived-sources.sh: * WebKitTestRunner/Scripts/generate-derived-sources.sh: Quote the use of CC so that future copy-paste does not make the same mistake as this bug. Canonical link: https://commits.webkit.org/240397@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent f31e1ab commit adb7a45

File tree

9 files changed

+66
-7
lines changed

9 files changed

+66
-7
lines changed

Source/JavaScriptCore/ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2021-08-10 Kimmo Kinnunen <[email protected]>
2+
3+
Scripts/generate-derived-sources.sh: line 19: [: binary operator expected while building Source/WebKit
4+
https://bugs.webkit.org/show_bug.cgi?id=228908
5+
6+
Reviewed by Per Arne Vollan.
7+
8+
* Scripts/generate-derived-sources.sh:
9+
Quote the use of CC so that future copy-paste does not make the same mistake
10+
as this bug.
11+
112
2021-08-09 Yusuke Suzuki <[email protected]>
213

314
[JSC] super-Latin1 white space and line terminator after regular expression literal misinterpreted as flags

Source/JavaScriptCore/Scripts/generate-derived-sources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cd "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore"
1111
export JavaScriptCore="JavaScriptCore"
1212
export BUILT_PRODUCTS_DIR="../.."
1313

14-
if [ ! $CC ]; then
14+
if [ ! "$CC" ]; then
1515
export CC="`xcrun -find clang`"
1616
fi
1717

Source/WebCore/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2021-08-10 Kimmo Kinnunen <[email protected]>
2+
3+
Scripts/generate-derived-sources.sh: line 19: [: binary operator expected while building Source/WebKit
4+
https://bugs.webkit.org/show_bug.cgi?id=228908
5+
6+
Reviewed by Per Arne Vollan.
7+
8+
9+
* Scripts/generate-derived-sources.sh:
10+
Quote the use of CC so that future copy-paste does not make the same mistake
11+
as this bug.
12+
113
2021-08-10 Devin Rousso <[email protected]>
214

315
[macOS] REGRESSION(r278850): modifying `playbackRate` via JS on a TouchBar mac only sometimes works and also causes the `defaultPlaybackRate` to change

Source/WebCore/Scripts/generate-derived-sources.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export WebCore="WebCore"
1212
/bin/ln -sfh "${JAVASCRIPTCORE_PRIVATE_HEADERS_DIR}" JavaScriptCorePrivateHeaders
1313
export JavaScriptCore_SCRIPTS_DIR="JavaScriptCorePrivateHeaders"
1414

15-
if [ ! $CC ]; then
15+
if [ ! "$CC" ]; then
1616
export CC="`xcrun -find clang`"
1717
fi
1818

19-
if [ ! $GPERF ]; then
19+
if [ ! "$GPERF" ]; then
2020
export GPERF="`xcrun -find gperf`"
2121
fi
2222

Source/WebKit/ChangeLog

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
2021-08-10 Kimmo Kinnunen <[email protected]>
2+
3+
Scripts/generate-derived-sources.sh: line 19: [: binary operator expected while building Source/WebKit
4+
https://bugs.webkit.org/show_bug.cgi?id=228908
5+
6+
Reviewed by Per Arne Vollan.
7+
8+
Change variable references in the sh script to quoted "$VAR".
9+
[ -z $VAR ] with VAR="a b" would mean
10+
[ -z a b ].
11+
-z is unary operator, so the expression b would be in position
12+
where test would expect an operator.
13+
The correct form is [ -z "a b" ].
14+
15+
In general, sh scripts usually refer to variables using quotes.
16+
17+
* Scripts/generate-derived-sources.sh:
18+
Fix a bug where multiple space separated paths in
19+
WEBKITADDITIONS_HEADER_SEARCH_PATHS would cause
20+
test expression to receive arguments after the -z arg.
21+
22+
Quote the use of CC so future copy-paste does not make the same mistake
23+
as this bug.
24+
125
2021-08-10 Peng Liu <[email protected]>
226

327
RemoteImageDecoderAVF::clearFrameBufferCache() uses a weak pointer without checking its validity

Source/WebKit/Scripts/generate-derived-sources.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ export WebKit2="${SRCROOT}"
1212
/bin/ln -sfh "${JAVASCRIPTCORE_PRIVATE_HEADERS_DIR}" JavaScriptCorePrivateHeaders
1313
export JavaScriptCore_SCRIPTS_DIR="JavaScriptCorePrivateHeaders"
1414

15-
if [ ! $CC ]; then
15+
if [ ! "$CC" ]; then
1616
export CC="`xcrun -find clang`"
1717
fi
1818

19-
if [ ! -z ${WEBKITADDITIONS_HEADER_SEARCH_PATHS} ]; then
19+
if [ ! -z "${WEBKITADDITIONS_HEADER_SEARCH_PATHS}" ]; then
2020
MAKEFILE_INCLUDE_FLAGS=$(echo "${WEBKITADDITIONS_HEADER_SEARCH_PATHS}" | perl -e 'print "-I" . join(" -I", split(" ", <>));')
2121
fi
2222

Tools/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2021-08-10 Kimmo Kinnunen <[email protected]>
2+
3+
Scripts/generate-derived-sources.sh: line 19: [: binary operator expected while building Source/WebKit
4+
https://bugs.webkit.org/show_bug.cgi?id=228908
5+
6+
Reviewed by Per Arne Vollan.
7+
8+
* DumpRenderTree/Scripts/generate-derived-sources.sh:
9+
* WebKitTestRunner/Scripts/generate-derived-sources.sh:
10+
Quote the use of CC so that future copy-paste does not make the same mistake
11+
as this bug.
12+
113
2021-08-10 Devin Rousso <[email protected]>
214

315
[macOS] REGRESSION(r278850): modifying `playbackRate` via JS on a TouchBar mac only sometimes works and also causes the `defaultPlaybackRate` to change

Tools/DumpRenderTree/Scripts/generate-derived-sources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cd "${BUILT_PRODUCTS_DIR}/DerivedSources/DumpRenderTree"
1010
export DumpRenderTree="${SRCROOT}"
1111
export WebCoreScripts="${WEBCORE_PRIVATE_HEADERS_DIR}"
1212

13-
if [ ! $CC ]; then
13+
if [ ! "$CC" ]; then
1414
export CC="`xcrun -find clang`"
1515
fi
1616

Tools/WebKitTestRunner/Scripts/generate-derived-sources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cd "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitTestRunner"
1010
export WebKitTestRunner="${SRCROOT}"
1111
export WebCoreScripts="${WEBCORE_PRIVATE_HEADERS_DIR}"
1212

13-
if [ ! $CC ]; then
13+
if [ ! "$CC" ]; then
1414
export CC="`xcrun -find clang`"
1515
fi
1616

0 commit comments

Comments
 (0)