mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
utils: Adjust 'wrap-program'.
* guix/build/utils.scm (wrap-program): Fix computation of PROG-REAL and PROG-TMP when PROG is an absolute file name. Add "$@" in the generated script, and quote PROG-REAL. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
867df0eeb6
commit
01155b1808
1 changed files with 3 additions and 3 deletions
|
@ -680,8 +680,8 @@ (define* (wrap-program prog #:rest vars)
|
|||
This is useful for scripts that expect particular programs to be in $PATH, for
|
||||
programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or
|
||||
modules in $GUILE_LOAD_PATH, etc."
|
||||
(let ((prog-real (string-append "." prog "-real"))
|
||||
(prog-tmp (string-append "." prog "-tmp")))
|
||||
(let ((prog-real (string-append (dirname prog) "/." (basename prog) "-real"))
|
||||
(prog-tmp (string-append (dirname prog) "/." (basename prog) "-tmp")))
|
||||
(define (export-variable lst)
|
||||
;; Return a string that exports an environment variable.
|
||||
(match lst
|
||||
|
@ -709,7 +709,7 @@ (define (export-variable lst)
|
|||
(with-output-to-file prog-tmp
|
||||
(lambda ()
|
||||
(format #t
|
||||
"#!~a~%~a~%exec ~a~%"
|
||||
"#!~a~%~a~%exec \"~a\" \"$@\"~%"
|
||||
(which "bash")
|
||||
(string-join (map export-variable vars)
|
||||
"\n")
|
||||
|
|
Loading…
Reference in a new issue