Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 7 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ case $OSTYPE in
;;
esac

# overriding CONFIG_FILE:
CONFIG_FILE="${BASH_IT_CONFIG_FILE:-"${CONFIG_FILE}"}"
# create subdir if CONFIG_FILE has subdirectory components
if [[ "${CONFIG_FILE%/*}" != "${CONFIG_FILE}" ]]; then
mkdir -p "${HOME}/${CONFIG_FILE%/*}"
fi

BACKUP_FILE=$CONFIG_FILE.bak
echo "Installing bash-it"
if [[ -z "${no_modify_config}" ]]; then
Expand Down
3 changes: 3 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ case $OSTYPE in
;;
esac

# overriding CONFIG_FILE:
CONFIG_FILE="${BASH_IT_CONFIG_FILE:-"${CONFIG_FILE}"}"

BACKUP_FILE=$CONFIG_FILE.bak

if [ ! -e "$HOME/$BACKUP_FILE" ]; then
Expand Down