SPAN - span shell fixes
This commit is contained in:
parent
8bed36a2d8
commit
2404ef828d
|
@ -38,8 +38,12 @@
|
|||
(set! s "")))))
|
||||
|
||||
(define (SPAN-shell-spawn mirror)
|
||||
(newline)
|
||||
(display "span> ")
|
||||
(do ((s (read)(read)))
|
||||
((null? s)0)
|
||||
(newline)
|
||||
(display "span> ")
|
||||
(cond ((symbol? s)
|
||||
(cond ((string<=? (symbol->string s)(string #\return))
|
||||
0)
|
||||
|
@ -52,4 +56,4 @@
|
|||
(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.")
|
||||
|
||||
|
||||
|
||||
(define questionaire
|
||||
(lambda ()
|
||||
(lambda (SPAN-dir)
|
||||
(define answer "")
|
||||
(define SPAN-build-and-cache-dir (string-append (getenv "HOME") "/.span"))
|
||||
(define SPAN-download-target-dir (string-append (getenv "HOME") "/.span"))
|
||||
(define SPAN-build-and-cache-dir SPAN-dir)
|
||||
(define SPAN-download-target-dir SPAN-dir)
|
||||
(define SPAN-mirror-url "localhost")
|
||||
;; question 1
|
||||
(cond
|
||||
((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
|
||||
(open-input-file (string-append SPAN-build-and-cache-dir "/mirror")))))
|
||||
(SPAN-shell-spawn SPAN-mirror-url)))
|
||||
|
@ -240,6 +241,7 @@ Enter 'h' for help.")
|
|||
(lambda (answer)
|
||||
(let ((dir (create-directory answer)))
|
||||
(if (file-directory? dir)
|
||||
(set! SPAN-dir answer)
|
||||
(set! SPAN-build-and-cache-dir answer)
|
||||
#f)))) answer)
|
||||
|
||||
|
|
|
@ -35,5 +35,7 @@
|
|||
;; Commands:
|
||||
;; h : display help
|
||||
;; get : fetch file
|
||||
|
||||
(questionaire)
|
||||
(define SPAN-dir (string-append (getenv "HOME") "/.span"))
|
||||
(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