On Sat, May 25, 2019 at 01:18:56PM +0200, pelzflorian (Florian Pelz) wrote:
> I added the --config-file option since by default
> usb_modeswitch_dispatcher loads its optional config file from /etc and
> a future Guix service type for USB_ModeSwitch should be able to pass a
> config file.
> […]
> + (substitute* "usb_modeswitch_dispatcher"
> + (("!/usr/bin/tclsh")
> + (string-append "!" jimtcl "/bin/jimsh"))
> + (("/usr/sbin") bin)
> + (("/usr/share/usb_modeswitch")
> + (string-append data "/share/usb_modeswitch.d"))
> + (("\\[ParseGlobalConfig\\]") ;use config in command line
> + "[ParseGlobalConfig $argv]")
> + (("proc \\{ParseGlobalConfig\\} \\{\\}")
> + "proc {ParseGlobalConfig} {argv}")
> + (("set configFile \\\"\\\"")
> + "
> +if {[lindex $argv 2] == \"--config-file\"} {
> + set configFile [lindex $argv 3]
> +}"))
Or should I rather use a patch file instead of substitute*?