mirror of
https://github.com/itme-brain/dotfiles.git
synced 2026-03-23 11:29:44 -04:00
added bash
This commit is contained in:
parent
ae00569571
commit
47670cdb86
4 changed files with 33 additions and 4 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
|
@ -1,9 +1,15 @@
|
|||
[submodule "nvim"]
|
||||
path = nvim
|
||||
url = https://github.com/itme-brain/nvim.git
|
||||
|
||||
[submodule "vim"]
|
||||
path = vim
|
||||
url = https://github.com/itme-brain/vim.git
|
||||
|
||||
[submodule "git"]
|
||||
path = git
|
||||
url = https://github.com/itme-brain/git.git
|
||||
|
||||
[submodule "bash"]
|
||||
path = bash
|
||||
url = https://github.com/itme-brain/bash.git
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ Interactive menu lets you pick which configs to install. Each one is cloned as i
|
|||
|
||||
| Config | Repo | Location | What it is |
|
||||
|--------|------|----------|------------|
|
||||
| **bash** | [itme-brain/bash](https://github.com/itme-brain/bash) | `~/.config/bash` | Bash config with aliases, prompt, and functions |
|
||||
| **git** | [itme-brain/git](https://github.com/itme-brain/git) | `~/.config/git` | My global git config and ignores |
|
||||
| **vim** | [itme-brain/vim](https://github.com/itme-brain/vim) | `~/.vim` | Lightweight vim for servers and quick edits. Plugins auto-install on first run |
|
||||
| **nvim** | [itme-brain/nvim](https://github.com/itme-brain/nvim) | `~/.config/nvim` | Full IDE setup with LSP, treesitter, telescope |
|
||||
|
|
@ -25,6 +26,7 @@ Interactive menu lets you pick which configs to install. Each one is cloned as i
|
|||
## Install one at a time
|
||||
|
||||
```bash
|
||||
git clone git@github.com:itme-brain/bash.git ~/.config/bash && echo "source ~/.config/bash/bashrc" >> ~/.bashrc
|
||||
git clone git@github.com:itme-brain/git.git ~/.config/git
|
||||
git clone git@github.com:itme-brain/vim.git ~/.vim
|
||||
git clone git@github.com:itme-brain/nvim.git ~/.config/nvim
|
||||
|
|
@ -35,9 +37,10 @@ git clone git@github.com:itme-brain/nvim.git ~/.config/nvim
|
|||
Each config is its own repo. Just pull:
|
||||
|
||||
```bash
|
||||
cd ~/.config/bash && git pull
|
||||
cd ~/.config/git && git pull
|
||||
cd ~/.vim && git pull
|
||||
cd ~/.config/nvim && git pull
|
||||
cd ~/.config/git && git pull
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
|
|
|||
1
bash
Submodule
1
bash
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 79eb823bbb9ff88f284ae055fe1de954df8bf2e0
|
||||
25
install
25
install
|
|
@ -13,15 +13,21 @@ if is_windows; then
|
|||
GIT_TARGET="$HOME/.config/git"
|
||||
VIM_TARGET="$HOME/vimfiles"
|
||||
NVIM_TARGET="$APPDATA_LOCAL/nvim"
|
||||
BASH_TARGET="$HOME/.config/bash"
|
||||
else
|
||||
GIT_TARGET="$HOME/.config/git"
|
||||
VIM_TARGET="$HOME/.vim"
|
||||
NVIM_TARGET="$HOME/.config/nvim"
|
||||
BASH_TARGET="$HOME/.config/bash"
|
||||
fi
|
||||
|
||||
names=("git" "vim" "nvim")
|
||||
repos=("$REPO_BASE/git.git" "$REPO_BASE/vim.git" "$REPO_BASE/nvim.git")
|
||||
targets=("$GIT_TARGET" "$VIM_TARGET" "$NVIM_TARGET")
|
||||
names=("bash" "git" "vim" "nvim")
|
||||
targets=("$BASH_TARGET" "$GIT_TARGET" "$VIM_TARGET" "$NVIM_TARGET")
|
||||
|
||||
repos=()
|
||||
for name in "${names[@]}"; do
|
||||
repos+=("$REPO_BASE/$name.git")
|
||||
done
|
||||
selected=()
|
||||
|
||||
for i in "${!names[@]}"; do
|
||||
|
|
@ -116,6 +122,19 @@ for i in "${!names[@]}"; do
|
|||
any_selected=true
|
||||
echo "Installing ${names[$i]}..."
|
||||
install_config "${repos[$i]}" "${targets[$i]}"
|
||||
|
||||
# Bash needs ~/.bashrc to source it
|
||||
if [ "${names[$i]}" = "bash" ]; then
|
||||
BASHRC="$HOME/.bashrc"
|
||||
SOURCE_LINE="source ~/.config/bash/bashrc"
|
||||
if [ -f "$BASHRC" ] && grep -qF "$SOURCE_LINE" "$BASHRC"; then
|
||||
echo " ~/.bashrc already sources config"
|
||||
else
|
||||
echo "$SOURCE_LINE" >> "$BASHRC"
|
||||
echo " Added source line to ~/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue