function sms_twilio_drush_download in Twilio SMS Integration 7
Same name and namespace in other branches
- 7.2 drush/sms_twilio.drush.inc \sms_twilio_drush_download()
Downloads
1 call to sms_twilio_drush_download()
- drush_sms_twilio_post_enable in drush/
sms_twilio.drush.inc - Implements drush_MODULE_post_COMMAND().
1 string reference to 'sms_twilio_drush_download'
- sms_twilio_drush_command in drush/
sms_twilio.drush.inc - Implements hook_drush_command().
File
- drush/
sms_twilio.drush.inc, line 26 - Drush integration for the sms_twilio module.
Code
function sms_twilio_drush_download() {
$args = func_get_args();
if ($args[0]) {
$path = $args[0];
}
else {
$path = drush_get_context('DRUSH_DRUPAL_ROOT') . '/sites/all/libraries/twilio';
}
if (drush_shell_exec('git clone https://github.com/twilio/twilio-php.git ' . $path)) {
@drush_shell_exec('find ' . $path . ' -name ".git" -type d -exec rm -rf {} \\;');
drush_log(dt('Twilio has been downloaded to @path.', array(
'@path' => $path,
)), 'success');
}
else {
drush_log(dt('Drush was unable to download the Twilio to @path.', array(
'@path' => $path,
)), 'error');
}
}