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 +``` +