Use `find-executable-path' to find a tar executable, wait for it to finish.
This commit is contained in:
parent
da31296bf9
commit
3de1b31eaf
|
@ -135,10 +135,7 @@
|
||||||
(= (file-size dest) size))
|
(= (file-size dest) size))
|
||||||
(printf " ~a is ready\n" file)
|
(printf " ~a is ready\n" file)
|
||||||
(let* ([sub (unixize (system-library-subpath #f))]
|
(let* ([sub (unixize (system-library-subpath #f))]
|
||||||
[src (format "~a~a/~a"
|
[src (format "~a~a/~a" url-path sub file)])
|
||||||
url-path
|
|
||||||
sub
|
|
||||||
file)])
|
|
||||||
(unless explained?
|
(unless explained?
|
||||||
(set! explained? #t)
|
(set! explained? #t)
|
||||||
(printf ">> Downloading files from\n>> ~a~a\n" url-base sub)
|
(printf ">> Downloading files from\n>> ~a~a\n" url-base sub)
|
||||||
|
@ -185,15 +182,14 @@
|
||||||
(copy-file src dest))))
|
(copy-file src dest))))
|
||||||
|
|
||||||
(define (unpack-tgz src dest)
|
(define (unpack-tgz src dest)
|
||||||
(let ([src (path->complete-path src)])
|
(define src (path->string (path->complete-path src)))
|
||||||
(parameterize ([current-directory (let-values ([(base name dir?) (split-path dest)])
|
(parameterize ([current-directory
|
||||||
base)])
|
(let-values ([(base name dir?) (split-path dest)]) base)])
|
||||||
(subprocess (current-output-port)
|
(define-values [p pout pin perr]
|
||||||
(current-input-port)
|
(subprocess
|
||||||
(current-error-port)
|
(current-output-port) (current-input-port) (current-error-port)
|
||||||
"/usr/bin/tar"
|
(find-executable-path "tar") "zxf" src))
|
||||||
"zxf"
|
(subprocess-wait p)))
|
||||||
(path->string src)))))
|
|
||||||
|
|
||||||
(case (mode)
|
(case (mode)
|
||||||
[(download)
|
[(download)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user