From f4775268a22e1cd454555542587b729d5263946d Mon Sep 17 00:00:00 2001 From: bprieshof Date: Sun, 15 Sep 2019 19:58:33 +0200 Subject: [PATCH] Add 'Vars.md' --- Vars.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Vars.md diff --git a/Vars.md b/Vars.md new file mode 100644 index 0000000..dda265f --- /dev/null +++ b/Vars.md @@ -0,0 +1,48 @@ +# Standard variable definition + +## Package manager +###PKGM: defines package manager +Options +``` +PKGM="apt" #Normal view +PKGM="debconf-apt-progress -- apt" #Whiptail view +``` +Usage +``` +As replacement for package manager command (example: apt) +Defining pakage manager for use in other Vars +``` + +###PKGI: defines command to install command (requires PKGM to be set) +Options +``` +PKGI="${PKGM} install -y" +``` +Usage +``` +$PKGI +``` + + +###PKGA: defines command to add repo +Options +``` +PKGA="add-apt-repository" (software-properties-common is required) +``` +Usage +``` +$PKGA ppa:ondrej/php -y +``` + +## Other +###OUTPUT: used to silence a script +Options +``` +OUTPUT='/dev/null' #Hide output +OUTPUT='/dev/tty' #Display output +``` +Usage +``` +YourCommand > $OUTPUT 2>&1 +``` +