|
4386 | 4386 | (print "installed " bundle-name) |
4387 | 4387 | (when (get man :has-bin-script) |
4388 | 4388 | (def binpath (string (dyn *syspath*) s "bin")) |
4389 | | - (eprintf "executable scripts have been installed to %s" binpath)) |
| 4389 | + (eprintf "executable files have been installed to %s" binpath)) |
| 4390 | + (when (get man :has-man) |
| 4391 | + (def manpath (string (dyn *syspath*) s "man")) |
| 4392 | + (eprintf "man pages have been installed to %s" manpath)) |
4390 | 4393 | bundle-name) |
4391 | 4394 |
|
4392 | 4395 | (defn- bundle/pack |
|
4514 | 4517 | (errorf "bad path %s - file is a %s" src mode))) |
4515 | 4518 |
|
4516 | 4519 | (defn bundle/add-bin |
4517 | | - ``Add a script to the bin subdirectory of the current syspath. Scripts will |
4518 | | - be set to be executable.`` |
| 4520 | + ``Add a file to the "bin" subdirectory of the current syspath. By default, |
| 4521 | + files will be set to be executable.`` |
4519 | 4522 | [manifest src &opt filename chmod-mode] |
4520 | 4523 | (def s (sep)) |
4521 | 4524 | (default filename (last (string/split s src))) |
|
4524 | 4527 | (put manifest :has-bin-script true) |
4525 | 4528 | (bundle/add-file manifest src (string "bin" s filename) chmod-mode)) |
4526 | 4529 |
|
| 4530 | + (defn bundle/add-manpage |
| 4531 | + ``Add a file to the man subdirectory of the current syspath. Files are |
| 4532 | + copied inside a directory `mansec`. By default, `mansec` is "man1".`` |
| 4533 | + [manifest src &opt mansec] |
| 4534 | + (def s (sep)) |
| 4535 | + (default mansec "man1") |
| 4536 | + (def filename (last (string/split s src))) |
| 4537 | + (os/mkdir (string (dyn *syspath*) s "man")) |
| 4538 | + (os/mkdir (string (dyn *syspath*) s "man" s mansec)) |
| 4539 | + (put manifest :has-man true) |
| 4540 | + (bundle/add-file manifest src (string "man" s mansec s filename))) |
| 4541 | + |
4527 | 4542 | (defn bundle/update-all |
4528 | 4543 | "Reinstall all bundles." |
4529 | 4544 | [&keys configs] |
|
0 commit comments