-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·31 lines (29 loc) · 810 Bytes
/
setup.sh
File metadata and controls
executable file
·31 lines (29 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Versions
TMUX_VERSION=3.4
NEOVIM_VERSION=0.10.0
# Create own .bashrc.my and add to .bashrc
touch "$HOME/.bashrc.my"
# Text to add to .bashrc
TEXT_TO_ADD='[ -r ~/.bashrc.my ] && . ~/.bashrc.my'
# Check if the line is already in .bashrc
if ! grep -Fxq "$TEXT_TO_ADD" "$HOME/.bashrc"; then
echo "$TEXT_TO_ADD" >> "$HOME/.bashrc"
echo "Added to .bashrc: $TEXT_TO_ADD"
else
echo "Already exists in .bashrc: $TEXT_TO_ADD"
fi
# Path to setup repository
SCRIPT_DIR="$HOME/setup"
# Install spack in $HOME (if required)
cd ${SCRIPT_DIR}/spack
source install_spack.sh
# TMUX
cd ${SCRIPT_DIR}/tmux
source install_tmux.sh $TMUX_VERSION
source configure_tmux.sh $SCRIPT_DIR
# Neovim
cd ${SCRIPT_DIR}/neovim
source install_neovim.sh $NEOVIM_VERSION
source configure_neovim.sh $SCRIPT_DIR
cd $HOME