me
/
guix
Archived
1
0
Fork 0

utils: Generate valid substitutions in 'wrap-program'.

* guix/build/utils.scm (wrap-program)[export-variable]: Generate valid bash
  substitutions when using custom separators.
master
Jelle Licht 2018-08-20 16:51:04 +02:00
parent 4866cba66a
commit e6c4e41102
No known key found for this signature in database
GPG Key ID: DA4597F947B41025
1 changed files with 4 additions and 4 deletions

View File

@ -1057,11 +1057,11 @@ with definitions for VARS."
(format #f "export ~a=\"~a\""
var (string-join rest sep)))
((var sep 'prefix rest)
(format #f "export ~a=\"~a${~a~a+~a}$~a\""
var (string-join rest sep) var sep sep var))
(format #f "export ~a=\"~a${~a:+~a}$~a\""
var (string-join rest sep) var sep var))
((var sep 'suffix rest)
(format #f "export ~a=\"$~a${~a~a+~a}~a\""
var var var sep sep (string-join rest sep)))
(format #f "export ~a=\"$~a${~a+~a}~a\""
var var var sep (string-join rest sep)))
((var '= rest)
(format #f "export ~a=\"~a\""
var (string-join rest ":")))