aboutsummaryrefslogtreecommitdiff
path: root/pre-inst-env
blob: 9f76af424c7295e60e3e743d2007a03e63f68efe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /usr/bin/env guile
!#

(import (ice-9 match))

(define (prepend-path-env! name . values)
  (setenv name (string-join (append values
                                    (if (getenv name)
                                        (string-split (getenv name) #\:)
                                        '()))
                            ":")))

(prepend-path-env! "GUILE_LOAD_PATH" (dirname (current-filename)))

(match (command-line)
  ((_ command args ...)
   (apply execlp command command args)))