Properly quote optional parameters in build script (PR #2320)

This commit is contained in:
Penguin-Guru 2021-04-01 14:32:29 -07:00 committed by GitHub
parent cda5d11471
commit b1a3e10856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,9 @@ fi
if ((!installed)); then exit 12; fi
# Build the project in the build directory
./scripts/build.sh ${1:-gui translations} || exit 21
if (($#)); then ./scripts/build.sh "$@" || exit 21
else ./scripts/build.sh 'gui' 'translations' || exit 21
fi
# Move the built binary to the release folder with its config
./scripts/package.sh "release"

View File

@ -6,6 +6,6 @@ mkdir -p build
declare -i ret=0
pushd build
cmake ../src || ret=1
if ((!ret)); then make $@ -j$(($(nproc)+1)) || ret=2; fi
if ((!ret)); then make "$@" -j$(($(nproc)+1)) || ret=2; fi
popd
exit "$ret"