Re: mkdir in shell script
Re: mkdir in shell script
- Subject: Re: mkdir in shell script
- From: Scott Tooker <email@hidden>
- Date: Tue, 24 Aug 2004 11:08:44 -0700
This sounds like a bug, please file one with us so we can track this
issue.
Scott
On Aug 23, 2004, at 9:18 PM, Chuck Soper wrote:
Thanks for everyone's responses. I have developed a work-around.
What I have discovered is that if I have a copy files build phase to
the Resources directory then the following environment variables are
valid in my shell script build phase:
$SRCROOT
$TARGET_BUILD_DIR
$UNLOCALIZED_RESOURCES_FOLDER_PATH
When I removed the copy files build phase to the Resources directory
then the environment variables evaluated to null and the shell script
build phase broke.
I'm not sure if this is expected behavior, a bug, or something wrong
with my machine, but I have a work-around for now.
Chuck
At 8:40 PM -0700 8/23/04, Justin C. Walker wrote:
On Aug 23, 2004, at 17:17, Chuck Soper wrote:
Creed,
Thanks for the suggestion. I tried the script below. It doesn't
return any
errors, but it doesn't create the directory either. Does it > work
for you?
Chuck
I tried a modified version of Creed's script, with a directory name
of the form
/a/b/c
where /a exists, but b/c does not. I got an error ("/a/b: No such
file or directory").
If I change the 'mkdir' to read 'mkdir -p ...', the script works
(this was mentioned
earlier in this thread).
Hope that helps.
Regards,
Justin
At 3:04 PM -0700 8/23/04, Creed Erickson wrote:
> On Aug 23, 2004, at 1:07 PM, Chuck Soper wrote:
>
> #the script:
> echo "inBuildPhaseShellScript"
> srcPath="$SRCROOT/data"
>
destPath="$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/
data123"
>
> echo "path: $destPath"
> if [ ! -d "$destPath" ]; then
> mkdir "$destPath"
> fi
Try this:
#!/bin/sh
echo "inBuildPhaseShellScript"
srcPath="$SRCROOT/data"
destPath="$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/
data123"
export srcPath destPath
echo "path: $destPath"
if [ ! -d "$destPath" ]; then
mkdir "$destPath"
fi
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.