Hi Neil! Neil Jerram <n...@ossau.homelinux.net> skribis:
> Perhaps after all the right thing, for my use case, is something based > on (car (command-line)) and (getcwd). I currently have this > 'compatibility definition' for Guile 1.8.x: > > (define (current-filename) > (let* ((script (car (command-line))) > (scriptdir (dirname script)) > (absdir (cond ((string=? scriptdir ".") > (getcwd)) > ((string-match "^/" scriptdir) > scriptdir) > (else > (in-vicinity (getcwd) scriptdir))))) > (in-vicinity scriptdir (basename script)))) > > But maybe that's the better solution for 2.x as well. Yes, for that case, you definitely want something that happens at run-time, pretty much like $ORIGIN in ELF files. Thanks, Ludo’.