Skip to content

Commit

Permalink
implement Bash-it#2241
Browse files Browse the repository at this point in the history
- update `install.sh`
- update `README.md`

Signed-off-by: Max Kovgan <kovganm@gmail.com>
  • Loading branch information
mvk committed Feb 26, 2024
1 parent d985e4c commit 6e3888d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ That's it! :smiley:
You can check out more components of Bash-it, and customize it to your desire.
For more information, see detailed instructions [here](https://bash-it.readthedocs.io/en/latest/installation/).

### custom configuration file location

By default the instller modifies/creates the actual ``~/.bashrc`` is updated.
If this is undesirable, you can create another file, by run the installer:
```bash
BASH_IT_CONFIG_FILE=path/to/my/custom/location.bash ~/.bash_it/install.sh
```

## Contributing

Expand Down
5 changes: 5 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@ case $OSTYPE in
;;
esac

# overriding CONFIG_FILE:
CONFIG_FILE="${BASH_IT_CONFIG_FILE:-"${CONFIG_FILE}"}"
# create subdir if CONFIG_FILE has subdirectory components
[[ "${CONFIG_FILE%/*}" != "${CONFIG_FILE}" ]] && mkdir -p "${CONFIG_FILE%/*}"
BACKUP_FILE=$CONFIG_FILE.bak

echo "Installing bash-it"
if [[ -z "${no_modify_config}" ]]; then
_bash-it_modify_config_files
Expand Down

0 comments on commit 6e3888d

Please sign in to comment.