skip ".git" or ".svn" in a collects directory
Also, update the documentation for `raco setup' and its handling of command-line argument.
This commit is contained in:
parent
c3cd089758
commit
4080446c50
|
@ -60,10 +60,18 @@ The @exec{raco setup} command performs two main services:
|
|||
|
||||
@itemize[
|
||||
|
||||
@item{@bold{Compiling and setting up all (or some of the)
|
||||
collections:} When @exec{raco setup} is run without any arguments, it
|
||||
finds all of the current collections (see @secref[#:doc
|
||||
ref-src]{collects}) and compiles libraries in each collection.
|
||||
@item{@bold{Compiling and setting up all or some collections:}
|
||||
When @exec{raco setup} is run without any arguments, it
|
||||
finds all of the current collections---see @secref[#:doc
|
||||
ref-src]{collects}---and compiles libraries in each collection.
|
||||
(Directories that are named @filepath{.git} or @filepath{.svn} are
|
||||
not treated as collections.)
|
||||
|
||||
To restrict @exec{raco setup} to a set of collections, provide the
|
||||
collection names as arguments. For example, @exec{raco setup
|
||||
scribblings/raco} would only compile and render the documentation
|
||||
for @exec{raco}, which is implemented in a
|
||||
@filepath{scribblings/raco} collection.
|
||||
|
||||
An optional @filepath{info.rkt} within the collection can indicate
|
||||
specifically how the collection's files are to be compiled and
|
||||
|
@ -83,9 +91,6 @@ The @exec{raco setup} command performs two main services:
|
|||
@racket[(processor-count)], which typically uses all the machine's
|
||||
processing cores.
|
||||
|
||||
The @Flag{l} flag takes one or more collection names and restricts
|
||||
@exec{raco setup}'s action to those collections.
|
||||
|
||||
The @DFlag{mode} @nonterm{mode} flag causes @exec{raco setup} to use a
|
||||
@filepath{.zo} compiler other than the default compiler, and to put
|
||||
the resulting @filepath{.zo} files in a subdirectory (of the usual
|
||||
|
@ -107,7 +112,7 @@ The @exec{raco setup} command performs two main services:
|
|||
@item{@bold{Unpacking @filepath{.plt} files:} A
|
||||
@filepath{.plt} file is a platform-independent distribution archive
|
||||
for software based on Racket. When one or more file names are
|
||||
provided as the command line arguments to @exec{raco setup}, the files
|
||||
provided as the command line arguments to @exec{raco setup} with the @Flag{A} flag, the files
|
||||
contained in the @filepath{.plt} archive are unpacked (according to
|
||||
specifications embedded in the @filepath{.plt} file) and only
|
||||
collections specified by the @filepath{.plt} file are compiled and
|
||||
|
|
|
@ -297,10 +297,16 @@
|
|||
maj
|
||||
min)))
|
||||
|
||||
(define (skip-collection-directory? collection)
|
||||
;; Skiping ".git" or ".svn" makes it cleaner to use a git of subversion
|
||||
;; checkout as a collection directory
|
||||
(regexp-match? #rx"[.](git|svn)$" (path->bytes collection)))
|
||||
|
||||
;; Add in all non-planet collections:
|
||||
(for ([cp (current-library-collection-paths)]
|
||||
#:when (directory-exists? cp)
|
||||
[collection (directory-list cp)]
|
||||
#:unless (skip-collection-directory? collection)
|
||||
#:when (directory-exists? (build-path cp collection)))
|
||||
(collection-cc! (list collection)
|
||||
#:path (build-path cp collection)))
|
||||
|
@ -317,6 +323,7 @@
|
|||
(for ([cp (in-list (links #:root? #t #:user? #f))]
|
||||
#:when (directory-exists? cp)
|
||||
[collection (directory-list cp)]
|
||||
#:unless (skip-collection-directory? collection)
|
||||
#:when (directory-exists? (build-path cp collection)))
|
||||
(cc! (list collection)
|
||||
#:path (build-path cp collection))))
|
||||
|
@ -336,6 +343,7 @@
|
|||
(for ([cp (in-list (links #:root? #t))]
|
||||
#:when (directory-exists? cp)
|
||||
[collection (directory-list cp)]
|
||||
#:unless (skip-collection-directory? collection)
|
||||
#:when (directory-exists? (build-path cp collection)))
|
||||
(cc! (list collection) #:path (build-path cp collection))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user