Crate shell_helper[][src]

Very simple helper functions to make building linux scripts in rust easier

Functions

command

Runs a command using shell (sh, bash, zsh, etc), name is used to make error messages useful, e.g. command("sh", "sudo pacman -Syyu", "update") would panic on Failed to execute update or Failed to wait on update. Returns output as Output

dialog

Asks question (inserting a newline at the end) and given options (a vector of tuples (option, function)) will show all optionsand numbers which have to be typed in in order to choose them. If user types in 0, the function returns

install

Installs a package using pacman, yaourt or dnf, pacman is default. Uses --noconfirm --needed by default, can give additional arguments. Uses command