1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-15 20:35:14 +03:00

fix: Prevent word splitting in compilation scripts when handling paths (#1502)

These invocations will all cause bugs when pwd returns something that
 can be interpreted by bash, the most common case being a folder
 with whitespaces in its name. In other words these can be triggered by
 calling the scripts from any folder that contains whitespaces.

 More info on this specific finding by shellcheck:
 https://github.com/koalaman/shellcheck/wiki/SC2046
This commit is contained in:
Samuel Henrique 2022-01-26 10:58:24 +00:00 committed by GitHub
parent c3c8a2e3f1
commit d09ba3adca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions

View file

@ -46,7 +46,7 @@ if [[ -n ${GCC_ARM} ]] ; then
export PATH=${GCC_ARM}:$PATH
fi
: ${SRCDIR:=$(dirname $(pwd)/"$0")/..}
: ${SRCDIR:=$(dirname "$(pwd)/$0")/..}
: ${BUILD_TYPE:=Debug}
: ${COMMON_OPTIONS:="-DCMAKE_BUILD_TYPE=$BUILD_TYPE -Wno-dev "}