Apply suggestions from code review

Co-authored-by: symphorien <symphorien@users.noreply.github.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
DavHau 2020-10-22 10:15:42 +07:00 committed by GitHub
parent 5c382b7f0e
commit 11a08bcfad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ gatherLibraries() {
# wrapper around patchelf to raise proper error messages
# containing the tried file name and command
runPatchelf() {
patchelf $@ || (echo "Command failed: patchelf $@" && exit 1)
patchelf "$@" || (echo "Command failed: patchelf $*" && exit 1)
}
addEnvHooks "$targetOffset" gatherLibraries
@ -231,7 +231,7 @@ autoPatchelf() {
echo "autoPatchelfHook could not satisfy dependency $failedDep"
depsMissing=1
done
if [ $depsMissing == 1 -a -z "$autoPatchelfIgnoreMissingDeps" ]; then
if [[ $depsMissing == 1 && -z "$autoPatchelfIgnoreMissingDeps" ]]; then
echo "Add the missing dependencies to the build inputs or set autoPatchelfIgnoreMissingDeps=true"
exit 1
fi