Add 'Vars.md'
This commit is contained in:
48
Vars.md
Normal file
48
Vars.md
Normal file
@@ -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 <package name>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
###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
|
||||||
|
```
|
||||||
|
|
||||||
Reference in New Issue
Block a user