macosforge / darwinbuild

Darwinbuild is a collection of tools that assist compilation of the many projects contained in Darwin, the open source base of Apple's macOS operating system.
https://macosforge.github.io/darwinbuild/
Other
128 stars 54 forks source link

Darwinbuild does not work if DARWIN_BUILDROOT directory contains a space character #2

Open macosforgebot opened 16 years ago

macosforgebot commented 16 years ago

@LudovicRousseau originally submitted this as ticket:2


proposed patch

--- darwinbuild 2007-11-13 10:51:47.000000000 +0100
+++ /usr/local/bin/darwinbuild  2007-11-13 12:02:12.000000000 +0100
@@ -203,7 +203,7 @@
        SourceCache="$DARWIN_BUILDROOT/Sources"
 fi

-if [ ! -e $SourceCache ]; then
+if [ ! -e "$SourceCache" ]; then
        mkdir -p "$SourceCache"
 fi

@@ -287,7 +287,7 @@
 ### a cached value.
 ###
 if [ "$build" == "" -a -f "$DARWIN_BUILDROOT/.build/build" ]; then
-       build="$(cat $DARWIN_BUILDROOT/.build/build)"
+       build="$(cat "$DARWIN_BUILDROOT"/.build/build)"
 fi

 ###
macosforgebot commented 16 years ago

wsiegrist@… originally submitted this as attachment:darwinbuild.diff:⁠ticket:2

macosforgebot commented 16 years ago

wsiegrist@… originally submitted this as comment:1:⁠ticket:2


I attached a patch which catches a few more cases, but its still not complete.

macosforgebot commented 16 years ago

wsiegrist@… originally submitted this as comment:2:⁠ticket:2