function drush_commerce_stripe_download in Commerce Stripe 7.2
A command callback.
1 call to drush_commerce_stripe_download()
- drush_commerce_stripe_post_pm_enable in ./
commerce_stripe.drush.inc - Implements drush_MODULE_post_COMMAND().
File
- ./
commerce_stripe.drush.inc, line 21 - Drush integration for the Commerce Stripe module.
Code
function drush_commerce_stripe_download() {
$path = drush_get_context('DRUSH_DRUPAL_ROOT');
if (module_exists('libraries')) {
$path .= '/' . libraries_get_path('stripe-php');
}
if (is_dir($path)) {
drush_log('Stripe PHP library already present. No download required.', 'ok');
}
elseif (drush_shell_exec('git clone git://github.com/stripe/stripe-php.git ' . $path)) {
drush_log(dt('Stripe PHP library has been cloned via git to @path.', array(
'@path' => $path,
)), 'success');
}
else {
drush_log(dt('Drush was unable to clone Stripe PHP library to @path.', array(
'@path' => $path,
)), 'warning');
}
}