Update GCC Wrapper scripts for portable build

The wrapper scripts incorrectly unwrapped arguments with spaces making
them appear to be multiple individual arguments instead of one quoted
argument.

ref: https://github.com/OpenDroneMap/ODM/pull/1170#issuecomment-716607868

Signed-off-by: Daniel Llewellyn <daniel@snapcraft.ninja>
pull/1176/head
Daniel Llewellyn 2020-10-26 15:56:10 +00:00
rodzic 03a7923433
commit 9abf1ee695
2 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -1,12 +1,12 @@
#!/bin/bash
args=""
declare -a args
for i in "$@"
do
if [[ $i != -march* ]]; then
args="$args $i"
if [[ "$i" != -march* ]]; then
args+=("$i")
fi
done
/usr/bin/g++_real -march=nehalem $args
/usr/bin/g++_real -march=nehalem "${args[@]}"

Wyświetl plik

@ -1,12 +1,12 @@
#!/bin/bash
args=""
declare -a args
for i in "$@"
do
if [[ $i != -march* ]]; then
args="$args $i"
if [[ "$i" != -march* ]]; then
args+=("$i")
fi
done
/usr/bin/gcc_real -march=nehalem $args
/usr/bin/gcc_real -march=nehalem "${args[@]}"