-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathINSTALL
More file actions
executable file
·24 lines (20 loc) · 762 Bytes
/
INSTALL
File metadata and controls
executable file
·24 lines (20 loc) · 762 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
#!/bin/sh
DIR=$(cd `dirname "$0"` && pwd);
INSTALLER=$(basename "$0")
for dotfile in "$DIR"/*; do
basename=$(basename "$dotfile")
[ "$basename" = "LICENSE" ] && continue
[ "$basename" = "README.md" ] && continue
[ "$basename" = "$INSTALLER" ] && continue # Don't install the installer
[ "${basename#.}" = "$basename" ] || continue # No actual dotfiles
destfile="$HOME/.${dotfile#$DIR/}"
[ -e "$destfile" ] && continue
echo "Installing $destfile"
ln -sf "$dotfile" "$destfile"
done
# Work around tmux not being able to source with a variable
if [ ! -e "$HOME/.tmux.conf.local" ]; then
hostname=$(hostname -s)
touch "$DIR/tmux.d/$hostname"
ln -s "$DIR/tmux.d/$hostname" "$HOME/.tmux.conf.local"
fi