Commit feb76385 authored by Darin Morrison's avatar Darin Morrison Committed by Austin Seipp

Fix mkdirhier.sh on OS X 10.9 (#8139)

Mac OS X 10.9 mkdir is apparently stricter than the Mac OS X 10.8
mkdir about which paths are considered valid arguments. For example,
in a typical build on Mac OS X 10.9, the first of the following
invocations of mkdirhier.sh will succeed but the second will fail:

"inplace/bin/mkdirhier"   utils/ghc-cabal/dist/build/tmp//.  # WORKS
"inplace/bin/mkdirhier"   bootstrapping/.                    # FAILS

Simply prefixing the path arguments with "./" causes both to succeed:

"inplace/bin/mkdirhier" ./utils/ghc-cabal/dist/build/tmp//.  # WORKS
"inplace/bin/mkdirhier" ./bootstrapping/.                    # WORKS

Testing indicates failure on paths satisfying all of these criteria:

- path is suffixed with "/."
- path is only 1 level deep (e.g., "foo/."; _not_ "foo/bar/.")
- path is _not_ prefixed with "./"

This workaround prefixes "./" to the path argument passed to mkdir.
Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 7186bdb1
#!/bin/sh #!/bin/sh
mkdir -p ${1+"$@"} mkdir -p ${1+"./$@"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment