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.30
diff -u -p -r1.1.2.30 drush_make.download.inc
--- drush_make.download.inc	15 Feb 2010 06:42:21 -0000	1.1.2.30
+++ drush_make.download.inc	29 Mar 2010 17:37:56 -0000
@@ -166,14 +166,29 @@ class DrushMakeDownload_Get extends Drus
     $name = $this->project->name;
     $tmp_path = $this->project->tmp_path;
     $filename = dt('file');
-    if (!empty($this->project->download['url'])) {
-      $url = $this->project->download['url'];
-      $filename = "$tmp_path/" . basename($url);
-      // Download the project -- try wget, fall back to curl.
-      if (drush_get_context('DRUSH_SIMULATE') || drush_shell_exec('wget %s -O %s', $url, $filename) || drush_shell_exec('curl -o %s %s', $filename, $url)) {
-        drush_log(dt('%project downloaded from %url.', array('%project' => $name, '%url' => $url)), 'ok');
-        return $filename;
-      }
+    $url = $this->project->download['url'];
+    $type = $this->project->download['type'];
+    if (!empty($url) {
+      switch ($type):
+        case 'get':
+          $filename = "$tmp_path/" . basename($url);
+          // Download the project -- try wget, fall back to curl.
+          if (drush_get_context('DRUSH_SIMULATE') || drush_shell_exec('wget %s -O %s', $url, $filename) || drush_shell_exec('curl -o %s %s', $filename, $url)) {
+            drush_log(dt('%project downloaded from %url.', array('%project' => $name, '%url' => $url)), 'ok');
+            return $filename;
+          }
+          break;
+        case 'post':
+          $file_type = $this->project->download['file_type'];
+          $post_data = $this->project->download['post_data'];
+          $filename = (empty($file_type)) ? "$tmp_path/" . basename($url) : "$tmp_path/" . basename($url) . ".$file_type";
+          // Download the project -- try wget, fall back to curl.
+          if (drush_get_context('DRUSH_SIMULATE') || drush_shell_exec('wget --post-data=%s %s -O %s', $post_data, $url, $filename) || drush_shell_exec('curl -d %s -o %s %s', $post_data, $filename, $url)) {
+            drush_log(dt('%project downloaded from %url.', array('%project' => $name, '%url' => $url)), 'ok');
+            return $filename;
+          }
+          break;
+      endswitch;
     }
     else {
       $url = dt("unspecified location");
