mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: git: Add phase to restore hooks shebang.
Fixes <https://bugs.gnu.org/25508>. * gnu/packages/version-control.scm (git)[arguments]: New phase restore-sample-hooks-shebang.
This commit is contained in:
parent
3428c66c5a
commit
46ce24fb2d
1 changed files with 10 additions and 0 deletions
|
@ -391,6 +391,16 @@ (define-public git
|
|||
(install-file "contrib/subtree/git-subtree.1"
|
||||
(string-append subtree "/share/man/man1"))
|
||||
#t)))
|
||||
(add-after 'install 'restore-sample-hooks-shebang
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(dir (string-append out "/share/git-core/templates/hooks")))
|
||||
(for-each (lambda (file)
|
||||
(format #t "restoring shebang on `~a'~%" file)
|
||||
(substitute* file
|
||||
(("^#!.*/bin/sh") "#!/bin/sh")))
|
||||
(find-files dir ".*"))
|
||||
#t)))
|
||||
(add-after 'install 'split
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
;; Split the binaries to the various outputs.
|
||||
|
|
Loading…
Reference in a new issue