Reputation: 13450
Very entry level question.
For the given working script:
#!/bin/bash
./configure $FLAGS --extra-cflags="-I$TOOLCHAIN_PREFIX/include $CFLAGS"
Is it possible to extract the "-I$TOOLCHAIN_PREFIX/include $CFLAGS"
part into a parameter?
E.g. Amongst others, I tried the following which will fail with unexpected EOF while looking for matching `"' :
#!/bin/bash
EXTRACT="\"-I$TOOLCHAIN_PREFIX/include $CFLAGS\""
./configure $FLAGS --extra-cflags=$EXTRACT
Upvotes: 2
Views: 41
Reputation: 798606
EXTRACT="-I$TOOLCHAIN_PREFIX/include $CFLAGS"
./configure $FLAGS --extra-cflags="$EXTRACT"
Upvotes: 1