summaryrefslogtreecommitdiff
path: root/install.sh
blob: 2abf996f0f73937d9806e721599b7b81264e4831 (plain)
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
#!/bin/sh

# DrNuget's dotfile bootstrapping script
# This is free software licensed under GNU GPLv2.0

# Install all home-directory dotfiles
for i in $(ls -ap | grep -v /); do
	rm $HOME/$i 2> /dev/null
	ln -s $PWD/$i $HOME/$i
done
if [ -f "$HOME/.bash_profile" ]; then
	rm $HOME/.bash_profile
	ln -s $HOME/.profile $HOME/.bash_profile
fi

# Install all .config dotfiles
for i in $(ls -A ./.config); do
	rm -rf $HOME/.config/$i 2> /dev/null
	ln -s $PWD/.config/$i $HOME/.config/$i
done


# Install all custom scripts
if [ ! -d "$HOME/.scripts" ]; then
	mkdir $HOME/.scripts
fi
if [ ! -d "$HOME/.scripts/files" ]; then
	mkdir $HOME/.scripts/files
fi

for i in $(ls -A ./.scripts); do
	ln -s $PWD/.scripts/$i $HOME/.scripts/$i
done