no log: [scripts] prevent globbing and word splitting (#1963)

Ran shellcheck and applied suggested fixes for prevention of
globbing and word splitting.

https://www.shellcheck.net/wiki/SC2046
https://www.shellcheck.net/wiki/SC2086
This commit is contained in:
Goran Džaferi 2022-10-03 21:35:23 -06:00 committed by GitHub
parent 8753e8c545
commit 25b8738c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -16,13 +16,13 @@ file_list=$(cat .github/files_to_copy)
for f in $file_list
do
echo "**** copying $f to release ****"
cp -r --parents $f $to_dist
cp -r --parents "$f" $to_dist
done
# COPY VERSION file
cp VERSION $to_dist
pushd __builds__/bazarr
zip -r ../bazarr.zip . -b $(mktemp -d)
zip -r ../bazarr.zip . -b "$(mktemp -d)"
popd
rm -rf $to_dist

View File

@ -8,7 +8,7 @@ master_version=$(git describe --tags --abbrev=0 --match "v[0-9].[0-9].[0-9]")
latest_verion=$(git describe --tags --abbrev=0)
if [[ $RELEASE_MASTER -eq 1 ]]; then
auto-changelog --stdout -t changelog-master.hbs --starting-version $master_version --commit-limit 3
auto-changelog --stdout -t changelog-master.hbs --starting-version "$master_version" --commit-limit 3
else
auto-changelog --stdout --starting-version $latest_verion --unreleased --commit-limit 0
auto-changelog --stdout --starting-version "$latest_verion" --unreleased --commit-limit 0
fi

View File

@ -9,7 +9,7 @@ file_list=$(cat .github/files_to_copy)
for f in $file_list
do
echo "**** checking $f ****"
if [ ! -f $f ] && [ ! -d $f ]; then
if [ ! -f "$f" ] && [ ! -d "$f" ]; then
echo "**** $f doesn't exist, skipping release ****"
exit 1
fi