diff options
| -rwxr-xr-x | guile-pre-inst-env | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/guile-pre-inst-env b/guile-pre-inst-env new file mode 100755 index 0000000..a723e5f --- /dev/null +++ b/guile-pre-inst-env @@ -0,0 +1,36 @@ +#! /usr/bin/env guile +!# +;;; run64 --- SRFI-64 test runner +;;; Copyright © 2022, 2025 Arun Isaac <arunisaac@systemreboot.net> +;;; +;;; This file is part of run64. +;;; +;;; run64 is free software: you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; run64 is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with run64. If not, see <https://www.gnu.org/licenses/>. + +(use-modules (chibi match)) + +(define (prepend-path-env! name . values) + (setenv name (string-join (append values + (if (getenv name) + (string-split (getenv name) #\:) + '())) + ":"))) + +(define %source-dir (dirname (current-filename))) + +(prepend-path-env! "PATH" (string-append %source-dir "/bin")) + +(match (command-line) + ((_ command args ...) + (apply execlp command command args))) |
