aboutsummaryrefslogtreecommitdiff
path: root/pre-inst-env
diff options
context:
space:
mode:
Diffstat (limited to 'pre-inst-env')
-rwxr-xr-xpre-inst-env17
1 files changed, 17 insertions, 0 deletions
diff --git a/pre-inst-env b/pre-inst-env
new file mode 100755
index 0000000..9f76af4
--- /dev/null
+++ b/pre-inst-env
@@ -0,0 +1,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)))