Very simple helper functions to make building linux scripts in rust easier
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 options and 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 repo 's package manager, e.g. aur would use yay, arch would
use pacman, dnf is default. Can give additional arguments. Uses command
|