Skip to content

Commit 8a2ff7c

Browse files
GH-46490: [CI][Dev] Add shellcheck ci/scripts/install_ccache.sh (#46492)
### Rationale for this change shellcheck outputs the following error in `ci/scripts/install_ccache.sh`. ``` In ci/scripts/install_ccache.sh line 35: curl --fail --location --remote-name ${url} ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: curl --fail --location --remote-name "${url}" In ci/scripts/install_ccache.sh line 36: unzip -j ccache-${version}-windows-x86_64.zip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: unzip -j ccache-"${version}"-windows-x86_64.zip In ci/scripts/install_ccache.sh line 38: mv ccache.exe ${prefix}/bin/ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mv ccache.exe "${prefix}"/bin/ In ci/scripts/install_ccache.sh line 44: wget -q ${url} -O - | tar -xzf - --directory /tmp/ccache --strip-components=1 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wget -q "${url}" -O - | tar -xzf - --directory /tmp/ccache --strip-components=1 ``` ### What changes are included in this PR? Fix shellcheck error. (Quote variables) ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #46490 Authored-by: Hiroyuki Sato <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent f4d52af commit 8a2ff7c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ repos:
197197
?^ci/scripts/conan_setup\.sh$|
198198
?^ci/scripts/download_tz_database\.sh$|
199199
?^ci/scripts/install_azurite\.sh$|
200+
?^ci/scripts/install_ccache\.sh$|
200201
?^ci/scripts/install_ceph\.sh$|
201202
?^ci/scripts/install_spark\.sh$|
202203
?^ci/scripts/integration_dask\.sh$|

ci/scripts/install_ccache.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ case $(uname) in
3232
MINGW64*)
3333
url="https://github.com/ccache/ccache/releases/download/v${version}/ccache-${version}-windows-x86_64.zip"
3434
pushd /tmp/ccache
35-
curl --fail --location --remote-name ${url}
36-
unzip -j ccache-${version}-windows-x86_64.zip
35+
curl --fail --location --remote-name "${url}"
36+
unzip -j "ccache-${version}-windows-x86_64.zip"
3737
chmod +x ccache.exe
38-
mv ccache.exe ${prefix}/bin/
38+
mv ccache.exe "${prefix}/bin/"
3939
popd
4040
;;
4141
*)
4242
url="https://github.com/ccache/ccache/archive/v${version}.tar.gz"
4343

44-
wget -q ${url} -O - | tar -xzf - --directory /tmp/ccache --strip-components=1
44+
wget -q "${url}" -O - | tar -xzf - --directory /tmp/ccache --strip-components=1
4545

4646
mkdir /tmp/ccache/build
4747
pushd /tmp/ccache/build
4848
cmake \
4949
-GNinja \
5050
-DCMAKE_BUILD_TYPE=Release \
51-
-DCMAKE_INSTALL_PREFIX=${prefix} \
51+
-DCMAKE_INSTALL_PREFIX="${prefix}" \
5252
-DZSTD_FROM_INTERNET=ON \
5353
..
5454
ninja install

0 commit comments

Comments
 (0)