SPAN - span shell fixes
This commit is contained in:
parent
8bed36a2d8
commit
2404ef828d
|
@ -38,8 +38,12 @@
|
||||||
(set! s "")))))
|
(set! s "")))))
|
||||||
|
|
||||||
(define (SPAN-shell-spawn mirror)
|
(define (SPAN-shell-spawn mirror)
|
||||||
|
(newline)
|
||||||
|
(display "span> ")
|
||||||
(do ((s (read)(read)))
|
(do ((s (read)(read)))
|
||||||
((null? s)0)
|
((null? s)0)
|
||||||
|
(newline)
|
||||||
|
(display "span> ")
|
||||||
(cond ((symbol? s)
|
(cond ((symbol? s)
|
||||||
(cond ((string<=? (symbol->string s)(string #\return))
|
(cond ((string<=? (symbol->string s)(string #\return))
|
||||||
0)
|
0)
|
||||||
|
@ -52,4 +56,4 @@
|
||||||
(url-bite-off mirror) 6969))
|
(url-bite-off mirror) 6969))
|
||||||
))
|
))
|
||||||
))
|
))
|
||||||
(display "Signing off."))
|
(display "span> signing off."))
|
|
@ -218,16 +218,17 @@ cpan shell -- CPAN exploration and modules installation (v1.9402)
|
||||||
Enter 'h' for help.")
|
Enter 'h' for help.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(define questionaire
|
(define questionaire
|
||||||
(lambda ()
|
(lambda (SPAN-dir)
|
||||||
(define answer "")
|
(define answer "")
|
||||||
(define SPAN-build-and-cache-dir (string-append (getenv "HOME") "/.span"))
|
(define SPAN-build-and-cache-dir SPAN-dir)
|
||||||
(define SPAN-download-target-dir (string-append (getenv "HOME") "/.span"))
|
(define SPAN-download-target-dir SPAN-dir)
|
||||||
(define SPAN-mirror-url "localhost")
|
(define SPAN-mirror-url "localhost")
|
||||||
;; question 1
|
;; question 1
|
||||||
(cond
|
(cond
|
||||||
((and (file-exists? SPAN-build-and-cache-dir)
|
((and (file-exists? SPAN-build-and-cache-dir)
|
||||||
(file-exists? (string-append SPAN-build-and-cache-dir "/mirror")))
|
(file-exists? (string-append SPAN-dir "/mirror")))
|
||||||
(let ((SPAN-mirror-url (make-string-input-port
|
(let ((SPAN-mirror-url (make-string-input-port
|
||||||
(open-input-file (string-append SPAN-build-and-cache-dir "/mirror")))))
|
(open-input-file (string-append SPAN-build-and-cache-dir "/mirror")))))
|
||||||
(SPAN-shell-spawn SPAN-mirror-url)))
|
(SPAN-shell-spawn SPAN-mirror-url)))
|
||||||
|
@ -240,6 +241,7 @@ Enter 'h' for help.")
|
||||||
(lambda (answer)
|
(lambda (answer)
|
||||||
(let ((dir (create-directory answer)))
|
(let ((dir (create-directory answer)))
|
||||||
(if (file-directory? dir)
|
(if (file-directory? dir)
|
||||||
|
(set! SPAN-dir answer)
|
||||||
(set! SPAN-build-and-cache-dir answer)
|
(set! SPAN-build-and-cache-dir answer)
|
||||||
#f)))) answer)
|
#f)))) answer)
|
||||||
|
|
||||||
|
|
|
@ -35,5 +35,7 @@
|
||||||
;; Commands:
|
;; Commands:
|
||||||
;; h : display help
|
;; h : display help
|
||||||
;; get : fetch file
|
;; get : fetch file
|
||||||
|
(define SPAN-dir (string-append (getenv "HOME") "/.span"))
|
||||||
(questionaire)
|
(questionaire SPAN-dir) ;; this changes the SPAN-dir
|
||||||
|
;; NOTE : after init of questionaire, you can spawn a shell:
|
||||||
|
;; (SPAN-shell-spawn (string-append SPAN-dir "/mirror"))
|
Loading…
Reference in New Issue