setup/dirs: add `find-user-links-file'
This commit is contained in:
parent
f8a225f741
commit
6a6d60dd5f
|
@ -982,6 +982,11 @@ v
|
|||
reference-doc]{collection links file}. The file indicated by the
|
||||
returned path may or may not exist.}
|
||||
|
||||
@defproc[(find-user-links-file [vers string? (get-installation-name)]) path?]{
|
||||
Returns a path to the user's @tech[#:doc reference-doc]{collection
|
||||
links file}. The file indicated by the returned path may or may not
|
||||
exist.}
|
||||
|
||||
@defproc[(get-links-search-files) path?]{
|
||||
Returns a list of paths to installation @tech[#:doc
|
||||
reference-doc]{collection links files} that are search in
|
||||
|
|
|
@ -360,7 +360,8 @@
|
|||
;; Links files
|
||||
|
||||
(provide find-links-file
|
||||
get-links-search-files)
|
||||
get-links-search-files
|
||||
find-user-links-file)
|
||||
|
||||
(define (find-links-file)
|
||||
(or (force config:links-file)
|
||||
|
@ -369,6 +370,11 @@
|
|||
(combine-search (force config:links-search-files)
|
||||
(list (find-links-file))))
|
||||
|
||||
(define (find-user-links-file [vers (get-installation-name)])
|
||||
(build-path (find-system-path 'addon-dir)
|
||||
vers
|
||||
"links.rktd"))
|
||||
|
||||
;; ----------------------------------------
|
||||
;; Packages
|
||||
|
||||
|
|
|
@ -1711,15 +1711,21 @@
|
|||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(setup-printf "version" "~a [~a]" (version) (system-type 'gc))
|
||||
(setup-printf "installation name" "~a" (get-installation-name))
|
||||
(setup-printf "variants" "~a" (string-join (map symbol->string (available-mzscheme-variants)) ", "))
|
||||
(setup-printf "main collects" "~a" main-collects-dir)
|
||||
(setup-printf "collects paths" (if (null? (current-library-collection-paths)) " empty!" ""))
|
||||
(for ([p (current-library-collection-paths)])
|
||||
(setup-printf #f " ~a" p))
|
||||
(setup-printf "main pkgs" "~a" (find-pkgs-dir))
|
||||
(setup-printf "pkgs paths" (if (null? (get-pkgs-search-dirs)) " empty!" ""))
|
||||
(setup-printf "pkgs paths" "")
|
||||
(for ([p (get-pkgs-search-dirs)])
|
||||
(setup-printf #f " ~a" p))
|
||||
(setup-printf #f " ~a" (find-user-pkgs-dir))
|
||||
(setup-printf "links files" "")
|
||||
(for ([p (get-links-search-files)])
|
||||
(setup-printf #f " ~a" p))
|
||||
(setup-printf #f " ~a" (find-user-links-file))
|
||||
(setup-printf "main docs" "~a" (find-doc-dir))
|
||||
|
||||
(when (and (not (null? (archives))) no-specific-collections?)
|
||||
|
|
Loading…
Reference in New Issue
Block a user