Skip to content

Commit 319d65f

Browse files
committed
implement #2241
- update `install.sh` & `uninstall.sh` - update `README.md` Signed-off-by: Max Kovgan <[email protected]>
1 parent d985e4c commit 319d65f

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

docs/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ That's it! :smiley:
4646
You can check out more components of Bash-it, and customize it to your desire.
4747
For more information, see detailed instructions [here](https://bash-it.readthedocs.io/en/latest/installation/).
4848

49+
### custom configuration file location
50+
51+
By default the instller modifies/creates the actual ``~/.bashrc`` is updated.
52+
If this is undesirable, you can create another file, by run the installer:
53+
```bash
54+
BASH_IT_CONFIG_FILE=path/to/my/custom/location.bash ~/.bash_it/install.sh
55+
```
4956

5057
## Contributing
5158

install.sh

+7
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@ case $OSTYPE in
194194
;;
195195
esac
196196

197+
# overriding CONFIG_FILE:
198+
CONFIG_FILE="${BASH_IT_CONFIG_FILE:-"${CONFIG_FILE}"}"
199+
# create subdir if CONFIG_FILE has subdirectory components
200+
if [[ "${CONFIG_FILE%/*}" != "${CONFIG_FILE}" ]]; then
201+
mkdir -p "${HOME}/${CONFIG_FILE%/*}"
202+
fi
203+
197204
BACKUP_FILE=$CONFIG_FILE.bak
198205
echo "Installing bash-it"
199206
if [[ -z "${no_modify_config}" ]]; then

uninstall.sh

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ case $OSTYPE in
1313
;;
1414
esac
1515

16+
# overriding CONFIG_FILE:
17+
CONFIG_FILE="${BASH_IT_CONFIG_FILE:-"${CONFIG_FILE}"}"
18+
1619
BACKUP_FILE=$CONFIG_FILE.bak
1720

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

0 commit comments

Comments
 (0)