-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·35 lines (29 loc) · 878 Bytes
/
install.sh
File metadata and controls
executable file
·35 lines (29 loc) · 878 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
32
33
34
35
echo "Installing dotfiles..."
# List dotfiles here
dotfiles=(".tmux.conf")
# List config directories (for .config/ directory)
configdirs=("nvim")
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
for dotfile in ${dotfiles[@]}; do
echo "Creating symlink for ${dotfile}..."
if [ -L ~/${dotfile} ] || [ -f ~/${dotfile} ]
then
echo "${dotfile} already exists! skipping ..."
else
ln -sf ${DIR}/${dotfile} ~/${dotfile}
fi
done
# Create .config directory if it doesn't exist
mkdir -p ~/.config
# Symlink config directories
for configdir in ${configdirs[@]}; do
echo "Creating symlink for config/${configdir}..."
if [ -L ~/.config/${configdir} ] || [ -d ~/.config/${configdir} ]
then
echo "~/.config/${configdir} already exists! skipping ..."
else
ln -sf ${DIR}/${configdir} ~/.config/${configdir}
fi
done
echo ""
echo "Done!"