Add define_env function for define environment
This commit is contained in:
parent
da921ae09a
commit
7680d8c96c
3 changed files with 45 additions and 1 deletions
15
README.md
15
README.md
|
@ -103,6 +103,21 @@ Install a systemd service as user, can be useful for timers for example :
|
|||
service_install "services/myservice.service" 1
|
||||
```
|
||||
|
||||
### define_env
|
||||
|
||||
Define an evirnment variable into the file `~/.config/environment`, you have to
|
||||
source this file on your `.bashrc` or your `.zprofile`.
|
||||
|
||||
- **input*** :
|
||||
- `$1` : name of the variable
|
||||
- `$2` : value, `""` if empty
|
||||
- **output** : no value, but exit the function if the variale is already
|
||||
defined (install) or not in file (uninstall)
|
||||
|
||||
```
|
||||
define_env "NOTMUCH_CONFIG" "~/.config/notmuch"
|
||||
```
|
||||
|
||||
### Avaible variables
|
||||
|
||||
- `$repository` : the root folder of the repository
|
||||
|
|
Reference in a new issue