Are certain variables that were available to run scripts in Xcode 3 no longer available to pre-build script actions in Xcode 4?
The script
PLIST_FILE="$SRCROOT/$INFOPLIST_FILE"
echo "${PLIST_FILE}"
produces just "/" as output: neither SRCROOT nor INFOPLIST_FILE appear to be defined. Do these have new names in Xcode 4; is this a bug?
Update: Xcode 4.1 finally addresses this issue. A new popup in the script editor lets you choose the target on which Xcode bases the environment variables it makes available to your script (you can still choose "none" ... an option of questionable usefulness).
Old Post About 4.0 Follows
That's because, for whatever reason, Xcode environment variables are unavailable in pre- and post-action scripts in the current version.
Nobody has any idea why (or how they're useful without envvars).
Quick test - Add this in a script:
printenv ~/Desktop/EnvVars.txt
... then open up the text file and witness the disappointment. :-)