Skip to content

Commit

Permalink
Merge pull request #941 from boegel/mrtrix_scripts
Browse files Browse the repository at this point in the history
also install scripts with MRtrix 0.3.14
  • Loading branch information
boegel committed May 31, 2016
2 parents b09de23 + 3d27f74 commit 18d9d8a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion easybuild/easyblocks/m/mrtrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,22 @@ def install_step(self):

elif LooseVersion(self.version) >= LooseVersion('0.3.14'):
release_dir = os.path.join(self.builddir, 'release')
scripts_dir = os.path.join(self.builddir, 'scripts')
try:
os.rmdir(self.installdir)
shutil.copytree(release_dir, self.installdir)
shutil.copytree(scripts_dir, os.path.join(self.installdir, 'scripts'))
except OSError as err:
raise EasyBuildError("Failed to copy %s to %s: %s", release_dir, self.installdir, err)
raise EasyBuildError("Failed to copy %s & %s to %s: %s", release_dir, scripts_dir, self.installdir, err)

def make_module_req_guess(self):
"""
Return list of subdirectories to consider to update environment variables;
also consider 'scripts' subdirectory for $PATH
"""
guesses = super(EB_MRtrix, self).make_module_req_guess()
guesses['PATH'].append('scripts')
return guesses

def sanity_check_step(self):
"""Custom sanity check for MRtrix."""
Expand Down

0 comments on commit 18d9d8a

Please sign in to comment.