dev/provisioning/modules/drush/manifests/extension.pp
author ymh <ymh.work@gmail.com>
Fri, 03 Feb 2017 13:01:08 +0100
changeset 495 c71923e6fa2f
parent 353 bf1bc6b08c46
permissions -rw-r--r--
Correct error when transitioning between thematiques tabs and others (bug #0025983) + correct scroll for themes

define drush::extension() {

  if (!defined(Class['drush'])) {
    fail('You must include class drush before declaring aliases')
  }

  # Split $name at the dash to eliminate the version component.
  $parts = split($name, '-')
  $extension_name = $parts[0]

  exec {"${drush::drush_exe_default} dl ${name}":
    command => "/usr/bin/su - -c '${drush::drush_exe_default} dl ${name}'",
    creates => "/usr/share/drush/commands/${extension_name}",
    notify  => Class['drush::cacheclear'],
  }

}