pallet.script.lib documentation

Script library for abstracting target host script differences

bash

fn

[& {:keys [login]}]

Call bash

env

fn

[& {:keys [vars]}]

Setup an environment for another cmd. Vars is a map of name and value pairs.

env-var-pairs

fn

[vars]

Return a sequence of name=var strings for the given vars map.

has-command?

fn

[arg]

Check whether the specified command is on the path

install-package

fn

[name & options]

Install the specified package.

list-installed-packages

fn

[& options]

List the installed packages

make-temp-dir

fn

[pattern & {:as options}]

Create a temporary directory

mkdir

fn

[directory & {:keys [path verbose mode]}]

Create the specified directory

normalise-md5

fn

[file]

Normalise an md5 sum file to contain the base filename

path-group

fn

[path]

Return the group of the given path

path-mode

fn

[path]

Return the mode of the given path

path-owner

fn

[path]

Return the owner of the given path

purge-package

fn

[name & options]

Uninstall the specified package, removing the configuration files if possible.

remove-package

fn

[name & options]

Uninstall the specified package, leaving the configuration files if possible.

rmdir

fn

[directory & {:as options}]

Remove the specified directory

selinux-bool

fn

[flag value & {:keys [persist]}]

Set the selinux boolean value

selinux-file-type

fn

[path type]

Set the selinux file type

update-package-list

fn

[& options]

Update the list of packages available to the package manager from the declared package sources.

upgrade-all-packages

fn

[& options]

Upgrade the all installed package.

upgrade-package

fn

[name & options]

Upgrade the specified package.

user-default-group

fn

[user]

Return the user's default group

wait-while

fn

[test-expr standoff max-retries waiting-msg failed-msg]

Returns a script expression that waits while test-expr is successful, using a constant standoff (in seconds) and max-retries.