Skip to content

Instantly share code, notes, and snippets.

@rupl
Created April 13, 2012 15:03
Show Gist options
  • Save rupl/2377501 to your computer and use it in GitHub Desktop.
Save rupl/2377501 to your computer and use it in GitHub Desktop.
diff --git a/drush/respondjs.drush.inc b/drush/respondjs.drush.inc
index 0226974..1f1b8da 100644
--- a/drush/respondjs.drush.inc
+++ b/drush/respondjs.drush.inc
@@ -6,6 +6,11 @@
*/
/**
+ * The URI to the respond.js library.
+ */
+define(RESPONDJS_DOWNLOAD_URI, 'https://raw.github.com/scottjehl/Respond/master/respond.min.js');
+
+/**
* Implementation of hook_drush_command().
*
* In this hook, you specify which commands your
@@ -82,7 +87,7 @@ function respondjs_drush_respondjs_download() {
if (is_file($path . '/respond.min.js')) {
drush_log('Respond.js already present. No download required.', 'ok');
}
- elseif (drush_op('chdir', $path) && drush_shell_exec('wget --no-check-certificate https://raw.github.com/scottjehl/Respond/master/respond.min.js')) {
+ elseif (drush_op('chdir', $path) && (drush_shell_exec('curl -O '. RESPONDJS_DOWNLOAD_URI) || drush_shell_exec('wget --no-check-certificate ' . RESPONDJS_DOWNLOAD_URI))) {
drush_log(dt('The latest respond.js library has been downloaded to @path', array('@path' => $path)), 'success');
}
else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment