Skip to content

Commit 76162c8

Browse files
committed
mesa-snapshot.sh: quote shell variables
This fixes shellcheck "SC2086 (info): Double quote to prevent globbing and word splitting." Signed-off-by: Robie Basak <[email protected]>
1 parent ba0c2a3 commit 76162c8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

overlay-debs/mesa-snapshot/mesa-snapshot.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ COMMIT=${COMMIT:-origin/main}
88
set -e
99

1010
DEB_FILE=${DSC_FILE%%.dsc}.debian.tar.xz
11-
ORIG_FILE=$(echo ${DSC_FILE} | sed -e 's/-.*/.orig.tar.xz/')
11+
ORIG_FILE=$(echo "${DSC_FILE}" | sed -e 's/-.*/.orig.tar.xz/')
1212

1313
rm -rf mesa
1414
git clone --depth 1 https://gitlab.freedesktop.org/mesa/mesa
1515

1616
cd mesa
17-
git fetch --depth 1 origin ${COMMIT##origin/}
17+
git fetch --depth 1 origin "${COMMIT##origin/}"
1818

19-
date=$(git log -1 --format=%cd --date=format:%Y%m%d ${COMMIT})
20-
subject=$(git log -1 --format="%h (\"%s\")" ${COMMIT})
19+
date=$(git log -1 --format=%cd --date=format:%Y%m%d "${COMMIT}")
20+
subject=$(git log -1 --format="%h (\"%s\")" "${COMMIT}")
2121
version=25.2.0~git${date}
2222

23-
rm -rf ../mesa-${version}
24-
mkdir ../mesa-${version}
25-
git archive --format=tar HEAD | tar x -C ../mesa-${version}
23+
rm -rf ../mesa-"${version}"
24+
mkdir ../mesa-"${version}"
25+
git archive --format=tar HEAD | tar x -C ../mesa-"${version}"
2626

27-
cd ../mesa-${version}
27+
cd ../mesa-"${version}"
2828

2929
rm -rf debian
30-
tar xJf ${DEB_FILE}
30+
tar xJf "${DEB_FILE}"
3131

3232
cat >> debian/changelog.tmp << EOF
3333
mesa (${version}-0qcom1) experimental; urgency=medium
@@ -49,4 +49,4 @@ debian/rules gentarball
4949

5050
rm -rf ../mesa
5151

52-
rm ${DSC_FILE} ${DEB_FILE} ${ORIG_FILE}*
52+
rm "${DSC_FILE}" "${DEB_FILE}" "${ORIG_FILE}"*

0 commit comments

Comments
 (0)