aboutsummaryrefslogtreecommitdiff
path: root/pre-inst-env
diff options
context:
space:
mode:
authorArun Isaac2021-12-24 16:44:21 +0530
committerArun Isaac2021-12-24 16:44:21 +0530
commitb857da2c36248dc7343861c02b916a08b95fcb1a (patch)
treecc971b56104e492cd9446480600c96819f347e0a /pre-inst-env
parent9d5c372b9caf2274fc15ad1bb9328f37ee845c68 (diff)
downloadgn-transform-databases-b857da2c36248dc7343861c02b916a08b95fcb1a.tar.gz
Add pre-inst-env.
* pre-inst-env: New file.
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)))