• 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: mkdir in shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mkdir in shell script


  • Subject: Re: mkdir in shell script
  • From: Dave Camp <email@hidden>
  • Date: Mon, 23 Aug 2004 13:47:40 -0700

On Aug 23, 2004, at 1:07 PM, Chuck Soper wrote:

At 11:40 AM -0600 8/23/04, Nick Zitzmann wrote:
On Aug 23, 2004, at 10:29 AM, Chuck Soper wrote:

What is the proper way to create a sub-directory via a shell script build phase? I'd like to write: if sub-directory doesn't exist then mkdir path. Can someone help me with this Unix command? (I think I could always call mkdir and have it error out 99% of the time, but that doesn't seem very clean to me.)

Instead of doing all that, why not just use 'mkdir -p' and be done with it...


From man mkdir:
-p Create intermediate directories as required. If this option is
not specified, the full path prefix of each operand must already
exist. On the other hand, with this option specified, no error
will be reported if a directory given as an operand already
exists. Intermediate directories are created with permission
bits of rwxrwxrwx (0777) as modified by the current umask, plus
write and search permission for the owner.


Dave
---
The path of least resistance, it's not just for electricity any more.
_______________________________________________
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.


  • Follow-Ups:
    • Re: mkdir in shell script
      • From: Chuck Soper <email@hidden>
References: 
 >mkdir in shell script (From: Chuck Soper <email@hidden>)
 >Re: mkdir in shell script (From: Nick Zitzmann <email@hidden>)
 >Re: mkdir in shell script (From: Chuck Soper <email@hidden>)

  • Prev by Date: SCM Error - Task not found at path: /usr/bin/
  • Next by Date: Re: mkdir in shell script
  • Previous by thread: Re: mkdir in shell script
  • Next by thread: Re: mkdir in shell script
  • Index(es):
    • Date
    • Thread