2021-02-05

(sph install)

copy files and set permissions, with an optional, automatically created command line interface for users to set install options.

part of sph-lib

library description

example

  (install-cli

    ("/tmp" "source/myfile" "source/mydir")

    (system-executables 700 "exe/sc")

    (guile-site-modules (600 700) "modules/sph" "modules/test"))

syntax

  install-cli :: install-config ...

    install-config will be wrapped in quasiquote, so that unquote and unquote-splicing can be used.

    arguments will be passed to install-cli-p.

    default options can be set, corresponding to the keyword arguments that "install" accepts.

    (install-cli

      (options #:directory-mode 700)

      (system-executables 700 "exe/sc"))

module name

(sph install)

exported bindings

procedure: install install-configs #:target-prefix #:regular-mode #:directory-mode #:symlink #:dry-run #:placeholders ->
install into target directories and set filesystem permissions.
install-configs is of the format ((string/symbol:target-path [mode] source-path ...) ...)
mode is optional and a decimal integer that will be parsed as if octal, for example 777 will become octal 777.
* copies source directories recursively
* option to symlink instead of copying
* placeholder for guile site directory
* default permissions are 644 and 755 for files and directories respectively
syntax: install-cli install-config ...
procedure: install-cli-p install-configs ->
like \"install\" but automatically creates a command-line interface for users to set custom options.
the first install-config can be of the format (options install-arguments ...), where options is a symbol.
install-arguments are defaults for the keyword arguments that \"install\" accepts and will be overridden by given command-line options
variable: sph-install-description