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))
|
||||
(printf " ~a is ready\n" file)
|
||||
(let* ([sub (unixize (system-library-subpath #f))]
|
||||
[src (format "~a~a/~a"
|
||||
url-path
|
||||
sub
|
||||
file)])
|
||||
[src (format "~a~a/~a" url-path sub file)])
|
||||
(unless explained?
|
||||
(set! explained? #t)
|
||||
(printf ">> Downloading files from\n>> ~a~a\n" url-base sub)
|
||||
|
@ -185,15 +182,14 @@
|
|||
(copy-file src dest))))
|
||||
|
||||
(define (unpack-tgz src dest)
|
||||
(let ([src (path->complete-path src)])
|
||||
(parameterize ([current-directory (let-values ([(base name dir?) (split-path dest)])
|
||||
base)])
|
||||
(subprocess (current-output-port)
|
||||
(current-input-port)
|
||||
(current-error-port)
|
||||
"/usr/bin/tar"
|
||||
"zxf"
|
||||
(path->string src)))))
|
||||
(define src (path->string (path->complete-path src)))
|
||||
(parameterize ([current-directory
|
||||
(let-values ([(base name dir?) (split-path dest)]) base)])
|
||||
(define-values [p pout pin perr]
|
||||
(subprocess
|
||||
(current-output-port) (current-input-port) (current-error-port)
|
||||
(find-executable-path "tar") "zxf" src))
|
||||
(subprocess-wait p)))
|
||||
|
||||
(case (mode)
|
||||
[(download)
|
||||
|
|
Loading…
Reference in New Issue
Block a user