Index: drush_make.download.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.download.inc,v
retrieving revision 1.1.2.55
diff -u -r1.1.2.55 drush_make.download.inc
--- drush_make.download.inc	30 Jun 2010 19:26:25 -0000	1.1.2.55
+++ drush_make.download.inc	2 Jul 2010 04:17:03 -0000
@@ -195,7 +195,8 @@
 
   protected function unpackGzip() {
     // Find out where contents will end up. Retrieve last column of output using awk.
-    drush_shell_exec("gzip --list %s | awk '{print $4;}'", $this->filename);
+    // JMS drush_shell_exec("gzip --list %s | awk '{print $4;}'", $this->filename);
+    drush_shell_exec("gzip --list %s | awk \"{print $4;}\"", $this->filename);
     $info = drush_shell_exec_output();
     if ($info) {
       $info = array_pop($info);
Index: drush_make.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.drush.inc,v
retrieving revision 1.11.2.60
diff -u -r1.11.2.60 drush_make.drush.inc
--- drush_make.drush.inc	30 Jun 2010 22:24:24 -0000	1.11.2.60
+++ drush_make.drush.inc	2 Jul 2010 04:17:03 -0000
@@ -352,15 +352,18 @@
 function drush_make_move_build($build_path) {
   $tmp_path = drush_make_tmp();
   if ($build_path == '.') {
-    drush_shell_exec('ls -A %s/__build__', $tmp_path);
+    drush_shell_exec('ls -A %s', $tmp_path . "/__build__");
     $info = drush_shell_exec_output();
     foreach ($info as $file) {
-      drush_shell_exec("cp -Rf %s/__build__/%s %s", $tmp_path, $file, $build_path);
+      //drush_shell_exec("cp -Rf %s/__build__/%s %s", $tmp_path, $file, $build_path);
+        //drush_shell_exec("mv -f %s %s", $tmp_path . "/__build__/" . $file, $build_path . "/" . $file);
+        drush_shell_exec("cp -Rf %s %s", $tmp_path . "/__build__/" . $file, $build_path . "/" . $file);
     }
   }
   else {
     drush_shell_exec('mkdir -p %s', dirname($build_path));
-    drush_shell_exec("mv %s/__build__ %s/%s", $tmp_path, $tmp_path, basename($build_path));
+    //drush_shell_exec("mv %s/__build__ %s/%s", $tmp_path, $tmp_path, basename($build_path));
+    drush_shell_exec("mv -f %s %s", $tmp_path . "/__build__", basename($build_path));
     drush_shell_exec("cp -Rf %s/%s %s", $tmp_path, basename($build_path), dirname($build_path));
   }
   return TRUE;
Index: drush_make.project.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.project.inc,v
retrieving revision 1.1.2.35
diff -u -r1.1.2.35 drush_make.project.inc
--- drush_make.project.inc	30 Jun 2010 02:34:58 -0000	1.1.2.35
+++ drush_make.project.inc	30 Jun 2010 17:44:26 -0000
@@ -69,8 +69,11 @@
         }
         if (file_exists($filename)) {
           $patches_txt .= '- ' . $url . "\n";
-          drush_shell_exec("mv %s %s", $filename, $project_directory);
-          $patched = drush_shell_exec("patch -p0 -d %s < %s/%s", $project_directory, $project_directory, $filename);
+//          drush_shell_exec("mv %s %s", $filename, $project_directory);
+//          $patched = drush_shell_exec("patch -p0 -d %s < %s/%s", $project_directory, $project_directory, $filename);
+          drush_shell_exec("mv -f %s %s", $filename, $project_directory);
+          $patched = drush_shell_exec("patch -p0 -d %s < %s", $project_directory, $project_directory . "/" . $filename);
+
           drush_log($this->name . ' patched with ' . $filename . '.', $patched ? 'ok' : 'error');
           drush_op('unlink', $project_directory . '/' . $filename);
         }
Index: drush_make.utilities.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.utilities.inc,v
retrieving revision 1.1.2.38
diff -u -r1.1.2.38 drush_make.utilities.inc
--- drush_make.utilities.inc	29 Jun 2010 22:03:41 -0000	1.1.2.38
+++ drush_make.utilities.inc	30 Jun 2010 17:56:04 -0000
@@ -259,7 +259,8 @@
 function drush_make_tmp() {
   static $tmp_dir;
   if (!isset($tmp_dir)) {
-    $tmp_dir = sys_get_temp_dir();
+    // JMS $tmp_dir = sys_get_temp_dir();
+    $tmp_dir = preg_replace('/\/$/','', str_replace('\\','/', sys_get_temp_dir()));
     $tmp_dir .= '/drush_make_tmp_' . time();
     drush_op('mkdir', $tmp_dir);
   }
@@ -307,14 +308,18 @@
   $dirname = basename($build_path, '.tar.gz');
   // Move the build directory to a more human-friendly name, so that tar will
   // use it instead.
-  drush_shell_exec("mv %s/__build__ %s/%s", $tmp_path, $tmp_path, $dirname);
+  // JMS drush_shell_exec("mv %s/__build__ %s/%s", $tmp_path, $tmp_path, $dirname);
+  drush_shell_exec("mv -f %s %s", $tmp_path . "/__build__", $tmp_path . "/" . $dirname);
   // Only move the tar file to it's final location if it's been built
   // successfully.
-  if (drush_shell_exec("tar -C %s -Pczf %s/%s %s", $tmp_path, $tmp_path, $filename, $dirname)) {
-    drush_shell_exec("mv %s/%s %s", $tmp_path, $filename, $build_path);
+//  if (drush_shell_exec("tar -C %s -Pczf %s/%s %s", $tmp_path, $tmp_path, $filename, $dirname)) {
+//    drush_shell_exec("mv %s/%s %s", $tmp_path, $filename, $build_path);
+  if (drush_shell_exec("tar -C %s -Pczf %s %s", $tmp_path, $tmp_path . "/" . $filename, $dirname)) {
+    drush_shell_exec("mv -f %s %s", $tmp_path . "/" . $filename, $build_path);
   };
   // Move the build directory back to it's original location for consistency.
-  drush_shell_exec("mv %s/%s %s/__build__", $tmp_path, $dirname, $tmp_path);
+  //drush_shell_exec("mv %s/%s %s/__build__", $tmp_path, $dirname, $tmp_path);
+  drush_shell_exec("mv -f %s %s", $tmp_path . "/" . $dirname, $tmp_path . "/__build__");
 }
 
 /**

