Documentation for kickstart namespace commands

This commit is contained in:
Bruno Tavares 2014-02-21 18:04:19 -03:00
parent 424a7166df
commit 26e3dac192
6 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# kickstart.codename
Prints the codename for the distro. For Ubuntu so far.
### Example
```bash
$ kickstart.codename
precise
```

View File

@ -0,0 +1,8 @@
# kickstart.command_exists command_name
Return 0 if commands is present on the current path, or 1 when it is not
### Example
```bash
$ kickstart.command_exists node || echo "Node not found"
```

14
docs/kickstart/context.md Normal file
View File

@ -0,0 +1,14 @@
# kickstart.context current_context
Store the current context so kickstart.mute and kickstart.info can append the information
### Example
```bash
$ kickstart.info Some information
Some information
$ kickstart.context Ubuntu
Setting up Ubuntu
$ kickstart.info Some information
Ubuntu >> Some information
```

11
docs/kickstart/mute.md Normal file
View File

@ -0,0 +1,11 @@
# kickstart.mute command to run
Run the command with stdout and stder outputing to /dev/null.
Inform it is about to run.
Returns the command result
### Example
```bash
$ kickstart.mute id root
Runnig "id root"
```

11
docs/kickstart/os.md Normal file
View File

@ -0,0 +1,11 @@
# kickstart.os
Print the current operational system name
### Example
```
$ kickstart.os
Ubuntu
$ kickstart.os
Mac
```

12
docs/kickstart/os/is.md Normal file
View File

@ -0,0 +1,12 @@
# kickstart.os.is os_name
Returns 0 if we are on the expected OS and 1 if not.
### Example
```bash
$ kickstart.os.is Ubuntu && echo We are on Ubuntu
$ ! kickstart.os.is Mac && echo We are not on Mac
$ if [ kickstart.os.is Ubuntu ]; then
echo Getting into Ubuntu system
fi
```