Skip to content

Commit 9b288a8

Browse files
committed
fix shfmt
1 parent 4ab67b8 commit 9b288a8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

toolchain/cc_wrapper.sh.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ trap cleanup EXIT
5151

5252
dirname_shim() {
5353
local path="$1"
54-
54+
5555
# Remove trailing slashes
5656
path="${path%/}"
5757

5858
# If there's no slash, return "."
59-
if [[ "$path" != */* ]]; then
59+
if [[ "${path}" != */* ]]; then
6060
echo "."
6161
return
6262
fi
@@ -74,7 +74,7 @@ toolchain_path_prefix="%{toolchain_path_prefix}"
7474
# Sometimes this path may be an absolute path in which case we dont do anything because
7575
# This is using the host toolchain to build.
7676
if [[ ${toolchain_path_prefix} != /* ]]; then
77-
toolchain_path_prefix="$script_dir/../../${toolchain_path_prefix#external/}"
77+
toolchain_path_prefix="${script_dir}/../../${toolchain_path_prefix#external/}"
7878
fi
7979

8080
if [[ ! -f ${toolchain_path_prefix}bin/clang ]]; then
@@ -89,7 +89,7 @@ function sanitize_option() {
8989
elif [[ ${opt} =~ ^-fsanitize-(ignore|black)list=[^/] ]] && [[ ${script_dir} == /* ]]; then
9090
# shellcheck disable=SC2206
9191
parts=(${opt/=/ }) # Split flag name and value into array.
92-
printf "%s" "${parts[0]}=$script_dir/../../../${parts[1]}"
92+
printf "%s" "${parts[0]}=${script_dir}/../../../${parts[1]}"
9393
else
9494
printf "%s" "${opt}"
9595
fi

toolchain/osx_cc_wrapper.sh.tpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ function parse_option() {
8686

8787
dirname_shim() {
8888
local path="$1"
89-
89+
9090
# Remove trailing slashes
9191
path="${path%/}"
9292

9393
# If there's no slash, return "."
94-
if [[ "$path" != */* ]]; then
94+
if [[ "${path}" != */* ]]; then
9595
echo "."
9696
return
9797
fi
@@ -108,10 +108,10 @@ toolchain_path_prefix="%{toolchain_path_prefix}"
108108
# Sometimes this path may be an absolute path in which case we dont do anything because
109109
# This is using the host toolchain to build.
110110
if [[ ${toolchain_path_prefix} != /* ]]; then
111-
toolchain_path_prefix="$script_dir/../../${toolchain_path_prefix#external/}"
112-
toolchain_path_prefix_abs="$(cd "$toolchain_path_prefix" && pwd -P)/"
111+
toolchain_path_prefix="${script_dir}/../../${toolchain_path_prefix#external/}"
112+
toolchain_path_prefix_abs="$(cd "${toolchain_path_prefix}" && pwd -P)/"
113113
else
114-
toolchain_path_prefix_abs="$toolchain_path_prefix"
114+
toolchain_path_prefix_abs="${toolchain_path_prefix}"
115115
fi
116116

117117
if [[ ! -f ${toolchain_path_prefix}bin/clang ]]; then
@@ -128,7 +128,7 @@ function sanitize_option() {
128128
elif [[ ${opt} =~ ^-fsanitize-(ignore|black)list=[^/] ]] && [[ ${script_dir} == /* ]]; then
129129
# shellcheck disable=SC2206
130130
parts=(${opt/=/ }) # Split flag name and value into array.
131-
printf "%s" "${parts[0]}=$script_dir/../../../${parts[1]}"
131+
printf "%s" "${parts[0]}=${script_dir}/../../../${parts[1]}"
132132
else
133133
printf "%s" "${opt}"
134134
fi

0 commit comments

Comments
 (0)