/usr/share/racket/collects/raco/command-name.rkt is in racket-common 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ;; The `setup' tool loads this module with bytecode files disabled,
;; so minimize its dependencies
(module command-name '#%kernel
(#%provide current-command-name
program+command-name
short-program+command-name)
(define-values (current-command-name) (make-parameter #f))
(define-values (program+command-name)
(lambda ()
(let-values ([(p) (find-system-path 'run-file)]
[(n) (current-command-name)])
(if n
(format "~a ~a" p n)
p))))
(define-values (short-program+command-name)
(lambda ()
(let-values ([(p) (find-system-path 'run-file)]
[(n) (current-command-name)])
(let-values ([(base name dir?) (split-path p)])
(let-values ([(name) (if (eq? (system-type) 'windows)
(string->path-element
(regexp-replace #rx"(?i:[.]exe)$"
(path-element->string name)
""))
name)])
(if n
(format "~a ~a" name n)
(path->string name))))))))
|