If I had an Adhoc.xcconfig
where I defined a variable:
PREPROCESSOR_DEFINITIONS = IS_ADHOC=1 CRASHLYTICS=1
and in a run script, there's a check that looks like:
if [ "${PREPROCESSOR_DEFINTIONS/CRASHLYTICS=1}" = "$PREPROCESSOR_DEFINITIONS" ] ; then
echo "Crashlytics is disabled, skipping Crashlytics dSYM upload"
else
echo "Crashlytics is on"
end
What does that if statement check? I'm unclear if the /
is syntax specific to bash or to xcconfig. What's also confusing is that the if statement is checking the result of an assignment using =
not ==
.
Breaking down the if statement piece by piece:
"${PREPROCESSOR_DEFINITIONS}/CRASHLYTICS=1}"
- is a variable expansion./
- is this indexing the larger variable,PREPROCESSOR_DEFINTIONS
to check for the existence of theCRASHLYTICS
variable?= "$PREPROCESSOR_DEFINITIONS"
- Is this just assigning this string literal to the result of the prior expression?
Anyone that could illuminate that syntax and what the if statement is trying to accomplish, that would be great.