• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: problem with shell script Build Phase
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with shell script Build Phase


  • Subject: Re: problem with shell script Build Phase
  • From: Joseph Kelly <email@hidden>
  • Date: Thu, 9 Mar 2006 15:56:15 -0800


On Mar 8, 2006, at 5:14 AM, Jeremy Dronfield wrote:

Are you using paths in your script with macros like $BUILD_DIR or $WRAPPER_NAME which refer to directories with spaces in their names? I've found a problem with Xcode 2.2.1 not escaping spaces in paths using these macros, causing rm and cp shell scripts to fail. In these cases, I had to replace the problem macros with full paths, with spaces manually escaped.

Put the script variables in quotes, and you'll get much better results. I've gotten into the habit of putting everything even numeric constants in quotes (/bin/sh, forgiveness in advance):


			cp "$THINGIE" "$PARENT_DIR"
			if [ "$?" -ne "0" ]; then
				echo "Error: thingie failed to copy (err=$?)"
				exit $?
			fi

joe k.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: problem with shell script Build Phase
      • From: Steve Checkoway <email@hidden>
References: 
 >problem with shell script Build Phase (From: Tommy Nordgren <email@hidden>)
 >Re: problem with shell script Build Phase (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: Something strange
  • Next by Date: Re: Target ignoring search headers
  • Previous by thread: Re: problem with shell script Build Phase
  • Next by thread: Re: problem with shell script Build Phase
  • Index(es):
    • Date
    • Thread