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.

dialog

Given options vector of tuples (name of the option, function to run) will show all options and numbers which have to typed in in order to choose them. If user types in 0, the function returns.

install

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