title: Shell Script Invocation Error with Xcode4 when trying to run a shell script as a build step
body: <p>Here is what I get when I try to build my Xcode project:</p>
  
  <pre><code>Intermediates/demo2.build/Debug-iphonesimulator/demo2.build/Script-5E564EAC1393823C00BFBA83.sh
  
  /Users/ssbarnea/Library/Developer/Xcode/DerivedData/demo2-fdzrmxojwtekcbeivraccjjadvqz/Build/Intermediates/demo2.build/Debug-iphonesimulator/demo2.build/Script-5E564EAC1393823C00BFBA83.sh: line 2: ${PROJECT_DIR}/local-deploy.sh: No such file or directory
  </code></pre>
  
  <p>In Xcode I added to the default arget a new Build Phase, a "Run Script" that runs with shell <code>/bin/sh</code> and contains only:</p>
  
  <pre><code>'${PROJECT_DIR}/local-deploy.sh'
  </code></pre>
  
  <p>I can assure you that the local-deploy.sh file exists in the project directory and that it is executable. It even works if I call it from the console ;)</p>