Allow for system-wide installations
This commit is contained in:
parent
bf11b14bdc
commit
233e049662
2 changed files with 14 additions and 4 deletions
16
README.md
16
README.md
|
@ -13,11 +13,19 @@ This is a premade and fully-fletched bashrc, fully configurable to your liking.
|
||||||
- ytfzf
|
- ytfzf
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### Installing
|
### Installing (user-wide)
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.staropensource.de/JeremyStarTM/jstmbash.git ${HOME}/.jstmbash # clone repository
|
git clone https://git.staropensource.de/JeremyStarTM/jstmbash.git "${HOME}/.jstmbash" # clone repository
|
||||||
echo "source \${HOME}/.jstmbash/init.source" >> "${HOME}/.bashrc" # add init script to bashrc
|
echo "source \${HOME}/.jstmbash/init.source" >> "${HOME}/.bashrc" # add init script to bashrc
|
||||||
cp ${HOME}/.jstmbash/config.env.example ${HOME}/.jstmbash/config.env # copy example config
|
cp "${HOME}/.jstmbash/config.env.example" "${HOME}/.jstmbash/config.env" # copy example config
|
||||||
${EDITOR} ${HOME}/.jstmbash/config.env # configure jstmbash
|
"${EDITOR}" "${HOME}/.jstmbash/config.env" # configure jstmbash
|
||||||
|
exec bash # restart bash
|
||||||
|
```
|
||||||
|
### Installing (system-wide)
|
||||||
|
```bash
|
||||||
|
git clone https://git.staropensource.de/JeremyStarTM/jstmbash.git /etc/jstmbash # clone repository
|
||||||
|
echo "source /etc/jstmbash/init.source" >> "/etc/bash.bashrc" # add init script to bashrc
|
||||||
|
cp "/etc/jstmbash/config.env.example" "/etc/jstmbash/config.env" # copy example config
|
||||||
|
"${EDITOR}" "/etc/jstmbash/config.env" # configure jstmbash
|
||||||
exec bash # restart bash
|
exec bash # restart bash
|
||||||
```
|
```
|
|
@ -13,6 +13,8 @@ fi
|
||||||
# source configuration file
|
# source configuration file
|
||||||
if [ -f "${HOME}/.jstmbash/config.env" ] && [ "${JSTMBASH_LOCAL_CONFIG}" != "true" ]; then
|
if [ -f "${HOME}/.jstmbash/config.env" ] && [ "${JSTMBASH_LOCAL_CONFIG}" != "true" ]; then
|
||||||
source "${HOME}/.jstmbash/config.env"
|
source "${HOME}/.jstmbash/config.env"
|
||||||
|
elif [ -f "/etc/jstmbash/config.env" ] && [ "${JSTMBASH_LOCAL_CONFIG}" != "true" ]; then
|
||||||
|
source "/etc/jstmbash/config.env"
|
||||||
elif [ -f "$(pwd)/config.env" ]; then
|
elif [ -f "$(pwd)/config.env" ]; then
|
||||||
source "$(pwd)/config.env"
|
source "$(pwd)/config.env"
|
||||||
else
|
else
|
||||||
|
|
Reference in a new issue