]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
git: Install bash-completion file.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 May 2012 13:51:39 +0000 (13:51 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 May 2012 13:51:39 +0000 (13:51 +0000)
bash-completion is a very handy feature and we
want to make use of it.

git/git.nm

index df2f449773588a726cff0e037b1fe0b8bf1605ea..361fad9217ee7071e3b6bc59fe9edba566a8bffd 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = git
 version    = 1.7.8.2
-release    = 1
+release    = 2
 
 groups     = Development/Tools
 url        = http://git-scm.com/
@@ -45,6 +45,9 @@ build
                echo "prefix = /usr" >> %{DIR_APP}/config.mak
                echo "gitwebdir = /var/www/git" >> %{DIR_APP}/config.mak
                echo "gitexecdir = lib/git-core" >> %{DIR_APP}/config.mak
+
+               # Remove shebang from bash-completion script.
+               sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash
        end
 
        build
@@ -52,6 +55,13 @@ build
        end
 
        make_install_targets += INSTALLDIRS=vendor
+
+       install_cmds
+               # Install bash completion file.
+               mkdir -pv %{BUILDROOT}%{sysconfdir}/bash_completion.d
+               install -v -m 644 contrib/completion/git-completion.bash \
+                       %{BUILDROOT}%{sysconfdir}/bash_completion.d/git
+       end
 end
 
 packages