I'm trying to pass a string variable to an application in a bash script:
# launch app for translator to verify
DIR="$( cd "$( dirname "$0" )" && pwd )"
langstr="'(English)'"
case $language in
"fr")
langstr="'(French)'";;
esac
echo $langstr
#$DIR/../Debug/MyApp.app/Contents/MacOS/MyApp -AppleLanguages '(French)'
$DIR/../Debug/MyApp.app/Contents/MacOS/MyApp -AppleLanguages $langstr
The echo reveals that $langstr is what I expect it to be: '(French)'. The commented line with the hard coded language parameter works fine (app launches in French), but substituting that with the line with the $langstr variable launches the app in English which probably means that it ignored it some how.
What I probably need is to find myself a lesson on bash variable usage, but I was hoping to get a quick answer here in the meantime.