? videoPlayer.swf
Index: flashy.drush.inc
===================================================================
RCS file: flashy.drush.inc
diff -N flashy.drush.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ flashy.drush.inc	20 Aug 2009 22:20:18 -0000
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Implementation of hook_drush_command().
+ *
+ * @See drush_parse_command() for a list of recognized keys.
+ * @return
+ *   An associative array describing your command(s).
+ */
+function flashy_drush_command() {
+  $items = array();
+
+  $items['flashy install'] = array(
+    'callback' => 'flashy_install',
+    'description' => "Finish installation of flashy.",
+    'examples' => array(
+      'drush flashy install' => 'Finish installation of flashy.',
+    ),
+  );
+
+  return $items;
+}
+
+function flashy_install() {
+  
+  // Get the filename...
+  $file = "videoPlayer.swf";
+  $filename = drupal_get_path('module', 'flashy')."/$file";
+  $fullpath = "http://flashy.googlecode.com/files/videoPlayer.swf";
+
+  if (file_exists($filename) || drush_get_context('DRUSH_SIMULATE')) {
+    drush_log("$file Already Exists!");
+  }
+
+  // Download it.
+  if (!drush_shell_exec("wget " . $fullpath)) {
+    drush_shell_exec("curl -O " . $fullpath);
+  }
+  
+  if(!drush_shell_exec("cp $file " . $filename)) {
+    drush_shell_exec("rm -rf $file");
+    return drush_set_error('DRUSH_PM_DOWNLOAD_FAILED', "Unable to download $file to $filename");
+  }
+
+  if (file_exists($filename)) {
+    drush_shell_exec("rm -rf $file");
+    return drush_print("Downloading $file was successful to $filename.");
+  }
+  else {
+    return drush_set_error('DRUSH_PM_DOWNLOAD_FAILED', "Unable to download $file to $filename");
+  }
+  
+  return TRUE;
+
+}
\ No newline at end of file
