Skip to content

Commit

Permalink
Merge pull request #47 from uml-digitalinitiatives/7.x-ISLANDORA-1213
Browse files Browse the repository at this point in the history
Fixes for drush command handling of paths.
  • Loading branch information
ruebot committed Mar 24, 2015
2 parents 1440e8b + c2e4081 commit 726dc2d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions islandora_openseadragon.drush.inc
Expand Up @@ -10,6 +10,12 @@
*/
define('OPENSEADRAGON_DOWNLOAD_URI', 'http://openseadragon.github.io/releases/openseadragon-bin-0.9.129.zip');

/**
* The original OpenSeadragon directory
*/
define('OPENSEADRAGON_ORIGINAL_DIR', 'openseadragon-bin-0.9.129');


/**
* Implements hook_drush_command().
*/
Expand Down Expand Up @@ -48,7 +54,7 @@ function drush_islandora_openseadragon_plugin() {
$path = $args[0];
}
else {
$path = 'sites/all/libraries';
$path = _drush_core_directory("@site:sites/all/libraries");
}

// Create the path if it does not exist.
Expand All @@ -64,7 +70,7 @@ function drush_islandora_openseadragon_plugin() {
// Download the zip archive.
if ($filepath = drush_download_file(OPENSEADRAGON_DOWNLOAD_URI)) {
$filename = basename($filepath);
$dirname = 'openseadragon';
$dirname = OPENSEADRAGON_ORIGINAL_DIR;

// Remove any existing Openseadragon plugin directory.
if (is_dir($dirname) || is_dir('openseadragon')) {
Expand Down

0 comments on commit 726dc2d

Please sign in to comment.