For example, the main Racket development repository includes a "pkgs" directory that holds packages such as base, and create-dirs-catalog constructs a catalog to be used to install those packages.
When run directly as a program, pkg/dirs-catalog expects a destination catalog followed by any number paths for directories that hold packages:
racket -l- pkg/dirs-catalog ‹dest-catalog› ‹dir› ...
The --immediate, --link, --merge, --check-metadata, and --quiet flags correspond to optional keyword arguments of create-dirs-catalog.
Added in version 220.127.116.11 of package base.
Changed in version 18.104.22.168: Added --immediate.
(create-dirs-catalog catalog-path dirs [ #:immediate? immediate? #:link? link? #:merge? merge? #:check-metadata? check-metadata? #:status-printf status-printf]) → void? catalog-path : path-string? dirs : (listof path-string?) immediate? : any/c = #f link? : any/c = #f merge? : any/c = #f check-metadata? : any/c = #f status-printf : (string? any/c ... -> void?) = void
If link? is true, then the catalog specifies that the package should be installed as a directory link, as opposed to copies.
If merge? is true, then existing catalog entries in catalog-path are preserved, otherwise old catalog entries are removed.
To create author and description information for each package in the catalog, create-dirs-catalog looks for a pkg-authors and pkg-desc definition in each package’s "info.rkt" file. If either definition is missing and check-metadata? is true, an error is reported.
If a package’s "info.rkt" file defines pkg-name, then the defined name is used as the package’s name instead of the package directory’s name.
Changed in version 22.214.171.124 of package base: Added the #:immediate argument.
Changed in version 126.96.36.199: Added support for pkg-name to name a package.