-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
executable file
·52 lines (45 loc) · 1.43 KB
/
deploy.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
envdir=$(pwd)
echo "Deploying environment..."
# create infrastructure
echo "Creating infrastructure..."
for dir in "$HOME/.irssi/scripts" "$HOME/.moc" "$HOME/.rtorrent/session" \
"$HOME/.vim/swp" "$HOME/.vim/undo" "$HOME/.xmonad"; do
if [ -d "$dir" ]; then
echo "I: Directory already exists: $dir."
else
printf "Creating $dir... "
mkdir -p "$dir"
echo "done."
fi
done
## create symlinks.
## quick, dirty, and hardwired for now...
echo "Creating symlinks... "
# devscripts
ln -s "$envdir/dotfiles/devscripts" "$HOME/.devscripts"
# git-buildpackage
ln -s "$envdir/dotfiles/gbp.conf" "$HOME/.gbp.conf"
# irssi
ln -s "$envdir/plugins/hilightwin.pl" "$HOME/.irssi/scripts/hilightwin.pl"
# lintian
ln -s "$envdir/dotfiles/lintianrc" "$HOME/.lintianrc"
# moc
ln -s "$envdir/dotfiles/moc_config" "$HOME/.moc/config"
# quilt
ln -s "$envdir/dotfiles/quiltrc" "$HOME/.quiltrc"
# rtorrent
ln -s "$envdir/dotfiles/rtorrent.rc" "$HOME/.rtorrent.rc"
# screen
ln -s "$envdir/dotfiles/screenrc" "$HOME/.screenrc"
# vim
ln -s "$envdir/dotfiles/vimrc" "$HOME/.vimrc"
# Xdefaults
ln -s "$envdir/dotfiles/Xdefaults" "$HOME/.Xdefaults"
# xmonad
ln -s "$envdir/dotfiles/xmonad/xmonad.hs" "$HOME/.xmonad/xmonad.hs"
[ -x "$(which xmonad)" ] && xmonad --recompile
ln -s "$envdir/dotfiles/xmonad/xmobarrc" "$HOME/.xmobarrc"
# xsession
ln -s "$envdir/dotfiles/xsession" "$HOME/.xsession"
echo "Deployed environment."