Revision
546
Author
wsiegrist@apple.com
Date
2009-08-13 12:00:33 -0700 (Thu, 13 Aug 2009)

Log Message

Fix initialization so that plists are actually fetched when doing "-init <build>"

Modified Paths

Diff

Modified: trunk/darwinbuild/darwinbuild.in (545 => 546)


--- trunk/darwinbuild/darwinbuild.in	2009-08-10 21:42:07 UTC (rev 545)
+++ trunk/darwinbuild/darwinbuild.in	2009-08-13 19:00:33 UTC (rev 546)
@@ -154,20 +154,17 @@
 	[ -d Logs ] || mkdir Logs
 	[ -d .build ] || mkdir .build
 
+	filename=$(basename "$build")
 	if [ -f "$build" ]; then
 		# user gave a local path to a plist
-		filepath="$build"
-		filename=$(basename "$filepath")
 		# since we don't want to download this, copy it
 		cp "$filepath" ".build/$filename"
 	elif [ $(echo $build | grep 'http://') ]; then
 		# user gave a URL to a webserver
 		host=$(dirname $build)
-		filename=$(basename $build)
 		Download .build $filename $host
 	elif [ $(echo $build | grep '\w@\w') ]; then
 		# user provided user@host:/path/file.plist
-		filename=$(basename $build)
 		scp $build .build/
 	fi
 	build=$(echo "$filename" | sed 's/.plist$//')