properly fix the readme issue

(cherry picked from commit 7cdb5787e5)
This commit is contained in:
Eli Barzilay 2010-07-25 21:14:00 -04:00
parent 9ccbf1ba0a
commit 96c1c445da

View File

@ -49,16 +49,16 @@
(define (level-of dir) (define (level-of dir)
(let ([dir (string->symbol (basename dir))]) (let ([dir (string->symbol (basename dir))])
(case dir (case dir
[(bin) #f] [(bin) #f]
[(collects) 1] [(collects) 1]
[(doc) 1] [(doc) 1]
[(include) 1] [(include) 1]
;; if shared libraries are used, then these files should be moved ;; if shared libraries are used, then these files should be moved
;; independently, as if they had a level of #f ;; independently, as if they had a level of #f
[(lib) 1] [(lib) 1]
[(man) #f] [(man) #f]
[(src) 1] [(src) 1]
[(readme.txt) #f] ; moved last [(README) #f] ; moved last
[else (error 'level-of "internal-error -- unknown dir: ~e" dir)]))) [else (error 'level-of "internal-error -- unknown dir: ~e" dir)])))
(define (make-path . args) ; like build-path but returns a string (define (make-path . args) ; like build-path but returns a string
@ -400,8 +400,8 @@
;; a place where it would not be usable. ;; a place where it would not be usable.
(when (and (directory-exists? "src") move?) (rm "src")) (when (and (directory-exists? "src") move?) (rm "src"))
;; part of the distribution: ;; part of the distribution:
(when (file-exists? "readme.txt") (when (file-exists? "README")
(do-tree "readme.txt" (make-path (dir: 'doc) "readme.txt"))) (do-tree "README" (make-path (dir: 'doc) "README")))
;; nothing should be left now if this was a move ;; nothing should be left now if this was a move
(when (and move? (not (null? (ls)))) (when (and move? (not (null? (ls))))
(error (format "leftovers in source tree: ~s" (ls)))) (error (format "leftovers in source tree: ~s" (ls))))