aboutsummaryrefslogtreecommitdiff
path: root/pre-inst-env
blob: f83ded1d34dd9edd5597df2dfc548367188886d5 (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-environment! name . values)
  (setenv name (string-join (append values
                                    (if (getenv name)
                                        (string-split (getenv name) #\:)
                                        '()))
                            ":")))

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

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