From 47aa8053e913be5954506bf96816cb0583536ccc Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Tue, 11 Apr 2017 05:39:03 -0700 Subject: Install the shell completion scripts (#3784) * Install the shell completion scripts Install the `git-completion.{bash,tcsh,zsh}` and `git-prompt.sh` into `$(spack location -i git)/share/` (aka `prefix.share/`). * Use copy_tree to copy all the files The dest dir already exists, so install_tree()'s not an option. --- var/spack/repos/builtin/packages/git/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index f0f3bfc6ba..24657e54dc 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -24,6 +24,7 @@ ############################################################################## import sys from spack import * +from distutils.dir_util import copy_tree class Git(AutotoolsPackage): @@ -166,6 +167,10 @@ class Git(AutotoolsPackage): # Don't link with -lrt; the system has no (and needs no) librt filter_file(r' -lrt$', '', 'Makefile') + @run_after('install') + def install_completions(self): + copy_tree('contrib/completion', self.prefix.share) + @run_after('install') def install_manpages(self): prefix = self.prefix -- cgit v1.2.3-70-g09d2