just skip a missing doc dir
svn: r9070
This commit is contained in:
parent
e40121e879
commit
2a443f0baf
|
@ -326,9 +326,13 @@
|
||||||
[(n) (error "Abort!")]
|
[(n) (error "Abort!")]
|
||||||
[else (loop)]))))))
|
[else (loop)]))))))
|
||||||
|
|
||||||
(define ((move/copy-tree move?) src dst*)
|
(define ((move/copy-tree move?) src dst* #:missing [missing 'error])
|
||||||
(define dst (if (symbol? dst*) (dir: dst*) dst*))
|
(define dst (if (symbol? dst*) (dir: dst*) dst*))
|
||||||
|
(define src-exists?
|
||||||
|
(or (directory-exists? src) (file-exists? src) (link-exists? src)))
|
||||||
(printf "~aing ~a -> ~a\n" (if move? "Mov" "Copy") src dst)
|
(printf "~aing ~a -> ~a\n" (if move? "Mov" "Copy") src dst)
|
||||||
|
(cond
|
||||||
|
[src-exists?
|
||||||
(make-dir* (dirname dst))
|
(make-dir* (dirname dst))
|
||||||
(let loop ([src (path->string (simplify-path src #f))]
|
(let loop ([src (path->string (simplify-path src #f))]
|
||||||
[dst (path->string (simplify-path dst #f))]
|
[dst (path->string (simplify-path dst #f))]
|
||||||
|
@ -355,7 +359,12 @@
|
||||||
(begin (ask-overwrite "dir" dst) (doit)))]
|
(begin (ask-overwrite "dir" dst) (doit)))]
|
||||||
[dst-f? (ask-overwrite "file" dst) (doit)]
|
[dst-f? (ask-overwrite "file" dst) (doit)]
|
||||||
[else (doit)]))))
|
[else (doit)]))))
|
||||||
(when move? (remove-empty-dirs src)))
|
(when move? (remove-empty-dirs src))]
|
||||||
|
[(eq? missing 'error)
|
||||||
|
(error (format " missing source path ~s, aborting..." src))]
|
||||||
|
[(eq? missing 'skip)
|
||||||
|
(printf " missing source path ~s, skipping...\n" src)]
|
||||||
|
[else (error 'move/copy-tree "internal error, unknown mode: ~e" missing)]))
|
||||||
|
|
||||||
;; --------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -368,7 +377,7 @@
|
||||||
(define binfiles (ls "bin")) ; see below
|
(define binfiles (ls "bin")) ; see below
|
||||||
(do-tree "bin" 'bin)
|
(do-tree "bin" 'bin)
|
||||||
(do-tree "collects" 'collects)
|
(do-tree "collects" 'collects)
|
||||||
(do-tree "doc" 'doc)
|
(do-tree "doc" 'doc #:missing 'skip) ; not included in mz distros
|
||||||
;; (do-tree ??? 'lib) ; shared stuff goes here
|
;; (do-tree ??? 'lib) ; shared stuff goes here
|
||||||
(do-tree "include" 'includeplt)
|
(do-tree "include" 'includeplt)
|
||||||
(do-tree "lib" 'libplt)
|
(do-tree "lib" 'libplt)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user