Skip to content

Commit 2edcdf3

Browse files
[gardening] Minor bash cleanups.
1 parent 51b2ba6 commit 2edcdf3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

utils/build-script-impl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ function false_true() {
879879
}
880880

881881
function cmake_version() {
882-
echo $("${CMAKE}" --version | grep "cmake version" | cut -f 3 -d " ")
882+
"${CMAKE}" --version | grep "cmake version" | cut -f 3 -d " "
883883
}
884884

885885
function cmake_needs_to_specify_standard_computed_defaults() {
@@ -914,7 +914,7 @@ function make_relative_symlink() {
914914
# - "BUILD_STDLIB_DEPLOYMENT_TARGETS" are the Targets to build in this invocation
915915

916916
CROSS_COMPILE_HOSTS=($CROSS_COMPILE_HOSTS)
917-
for t in ${CROSS_COMPILE_HOSTS} ; do
917+
for t in "${CROSS_COMPILE_HOSTS[@]}"; do
918918
case ${t} in
919919
iphone* | appletv* | watch* | linux-armv6 | linux-armv7 )
920920
;;
@@ -1171,7 +1171,7 @@ function calculate_targets_for_host() {
11711171
SWIFT_TEST_TARGETS=()
11721172

11731173
# Get the list of Target platforms for the Host
1174-
local stdlib_targets=(`echo $(get_stdlib_targets_for_host ${host})`)
1174+
local stdlib_targets=($(get_stdlib_targets_for_host ${host}))
11751175

11761176
for stdlib_deployment_target in "${stdlib_targets[@]}"; do
11771177
local swift_sdk=
@@ -1315,7 +1315,7 @@ function calculate_targets_for_host() {
13151315

13161316
# Filter duplicate SWIFT_SDKs
13171317
# We will get them if building for multiple architecture variants
1318-
SWIFT_SDKS=(`echo "${SWIFT_SDKS[@]}" | tr " " "\n" | sort -u | tr "\n" " "`)
1318+
SWIFT_SDKS=($(echo "${SWIFT_SDKS[@]}" | tr " " "\n" | sort -u | tr "\n" " "))
13191319

13201320
# Get the values passed by `build-script`.
13211321
LEGACY_SWIFT_STDLIB_TARGETS=(${SWIFT_STDLIB_TARGETS[@]})

0 commit comments

Comments
 (0)