website-build: build.sh: make it pass shellcheck.
Without that fix, shellcheck -x complains a lot: In build.sh line 53: mkdir -p "$(dirname ${dst_path})" ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. In build.sh line 82: git -C "${dst_path}" am $(realpath ${patch}) ^------------------^ SC2046 (warning): Quote this to prevent word splitting. git -C "${dst_path}" am $(realpath ${patch}) ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. In build.sh line 112: opt="$(eval echo \$$i)" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. In build.sh line 127: untitled_path="$(eval echo \$$(expr $i + 1))" ^------------^ SC2046 (warning): Quote this to prevent word splitting. untitled_path="$(eval echo \$$(expr $i + 1))" ^--^ SC2003 (style): expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. untitled_path="$(eval echo \$$(expr $i + 1))" ^-- SC2086 (info): Double quote to prevent globbing and word splitting. In build.sh line 128: i="$(expr "$i" + 1)" ^--^ SC2003 (style): expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. In build.sh line 136: i="$(expr "$i" + 1)" ^--^ SC2003 (style): expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]]. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
5203089a45
commit
22cc82e7d3
|
@ -66,6 +66,7 @@ run_shellcheck \
|
||||||
resources/scripts/tasks/distclean.sh \
|
resources/scripts/tasks/distclean.sh \
|
||||||
tests/distclean \
|
tests/distclean \
|
||||||
tests/lint \
|
tests/lint \
|
||||||
|
website-build/build.sh \
|
||||||
website-build/check.sh
|
website-build/check.sh
|
||||||
|
|
||||||
printf "+---------------------+\n"
|
printf "+---------------------+\n"
|
||||||
|
|
|
@ -50,7 +50,7 @@ sync_repo()
|
||||||
git clone "${src_uri}" "${dst_path}"
|
git clone "${src_uri}" "${dst_path}"
|
||||||
git -C "${dst_path}" checkout "${src_revision}"
|
git -C "${dst_path}" checkout "${src_revision}"
|
||||||
elif [ ! -d "${dst_path}" ] ; then
|
elif [ ! -d "${dst_path}" ] ; then
|
||||||
mkdir -p "$(dirname ${dst_path})"
|
mkdir -p "$(dirname "${dst_path}")"
|
||||||
cp -a "${src_path}" "${dst_path}"
|
cp -a "${src_path}" "${dst_path}"
|
||||||
if [ -n "${src_revision}" ] ; then
|
if [ -n "${src_revision}" ] ; then
|
||||||
git -C "${dst_path}" checkout "${src_revision}"
|
git -C "${dst_path}" checkout "${src_revision}"
|
||||||
|
@ -79,7 +79,7 @@ sync_repo()
|
||||||
for patch in ${src_patches} ; do
|
for patch in ${src_patches} ; do
|
||||||
GIT_COMMITTER_EMAIL="noreply@gnuboot.gnu.org" \
|
GIT_COMMITTER_EMAIL="noreply@gnuboot.gnu.org" \
|
||||||
GIT_COMMITTER_NAME="website-build" \
|
GIT_COMMITTER_NAME="website-build" \
|
||||||
git -C "${dst_path}" am $(realpath ${patch})
|
git -C "${dst_path}" am "$(realpath "${patch}")"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
rm -rf "${dst_path}"
|
rm -rf "${dst_path}"
|
||||||
|
@ -124,8 +124,8 @@ while [ "$i" -le $# ] ; do
|
||||||
help_missing_arg "--with-untitled-path"
|
help_missing_arg "--with-untitled-path"
|
||||||
exit ${EX_USAGE}
|
exit ${EX_USAGE}
|
||||||
fi
|
fi
|
||||||
untitled_path="$(eval echo \$$(expr $i + 1))"
|
untitled_path="$(eval echo \$$((i + 1)))"
|
||||||
i="$(expr "$i" + 1)"
|
i="$((i + 1))"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
help
|
help
|
||||||
|
@ -133,7 +133,7 @@ while [ "$i" -le $# ] ; do
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
i="$(expr "$i" + 1)"
|
i="$((i + 1))"
|
||||||
done
|
done
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
Loading…
Reference in New Issue