summaryrefslogtreecommitdiff
path: root/com/simatime/bild.scm
diff options
context:
space:
mode:
Diffstat (limited to 'com/simatime/bild.scm')
-rwxr-xr-xcom/simatime/bild.scm24
1 files changed, 3 insertions, 21 deletions
diff --git a/com/simatime/bild.scm b/com/simatime/bild.scm
index 604a545..44f6c74 100755
--- a/com/simatime/bild.scm
+++ b/com/simatime/bild.scm
@@ -122,6 +122,9 @@ exec guile -e "(@ (com simatime bild) main)" -s "$0" "$@"
(define-module (com simatime bild)
#:use-module ((ice-9 popen) #:prefix popen/)
#:use-module ((ice-9 format) #:select (format))
+ #:use-module ((ice-9 rdelim) #:prefix rdelim/)
+ #:use-module ((com simatime shell) #:prefix sh/)
+ #:use-module ((com simatime string) #:prefix string/)
#:export (ns?
ns->path
path->ns
@@ -156,24 +159,3 @@ exec guile -e "(@ (com simatime bild) main)" -s "$0" "$@"
((symbol? path) (to-ns (symbol->string path)))
((string? path) (to-ns path))
(else (error "path should be a string or symbol")))))
-
-
-;;
-;; general funs, to be moved to a core lib
-;;
-
-(define (string/replace s match replacement)
- (string-fold
- (lambda (a b)
- (let ((next-char (if (eq? a match)
- replacement
- a)))
- (string-concatenate (list b (string next-char)))))
- ""
- s))
-
-(define (sh/exec cmd)
- (let* ((port (popen/open-input-pipe cmd))
- (ret (read port)))
- (popen/close-pipe port)
- ret))