diff options
author | Goran Džaferi <[email protected]> | 2022-10-03 21:35:23 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-03 23:35:23 -0400 |
commit | 25b8738c05d16d16e705211d30b5925314086cc3 (patch) | |
tree | 6ee5cbe850dcadde04911b497ad284910ae8c23e | |
parent | 8753e8c5450070dae74708ffe9aef4313fa7f023 (diff) | |
download | bazarr-25b8738c05d16d16e705211d30b5925314086cc3.tar.gz bazarr-25b8738c05d16d16e705211d30b5925314086cc3.zip |
no log: [scripts] prevent globbing and word splitting (#1963)v1.1.2-beta.16
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
-rwxr-xr-x | .github/scripts/create_asset.sh | 4 | ||||
-rwxr-xr-x | .github/scripts/create_changelog.sh | 4 | ||||
-rwxr-xr-x | .github/scripts/pre_check.sh | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/.github/scripts/create_asset.sh b/.github/scripts/create_asset.sh index d699043b6..c60256347 100755 --- a/.github/scripts/create_asset.sh +++ b/.github/scripts/create_asset.sh @@ -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
\ No newline at end of file diff --git a/.github/scripts/create_changelog.sh b/.github/scripts/create_changelog.sh index 59dc0554e..8d2a35936 100755 --- a/.github/scripts/create_changelog.sh +++ b/.github/scripts/create_changelog.sh @@ -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
\ No newline at end of file diff --git a/.github/scripts/pre_check.sh b/.github/scripts/pre_check.sh index 0b283b88c..f4036d5ce 100755 --- a/.github/scripts/pre_check.sh +++ b/.github/scripts/pre_check.sh @@ -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 |