#!/bin/sh

CWD="$( cd "$( dirname "$0" )" && pwd )"

# BASH
# ----
ln -s "$CWD/bashrc/bashrc" "$HOME/.bashrc"
ln -s "$CWD/bashrc/bash_profile" "$HOME/.bash_profile"

# FISH
# ----
mkdir -p $HOME/.config/fish/
ln -s "$CWD/fish/config.fish" "$HOME/.config/fish/config.fish"

# VIM
# ---
echo set runtimepath+=$CWD/vim > "$HOME/.vimrc"
echo source $CWD/vim/vimrc >> "$HOME/.vimrc"

# MERCURIAL
# ---------
echo %include $CWD/hgrc/hgrc > "$HOME/.hgrc"
echo [ui] >> "$HOME/.hgrc"
echo ignore = $CWD/hgrc/hgignore >> "$HOME/.hgrc"
echo [extensions] >> "$HOME/.hgrc"
echo hggit = $CWD/lib/hg/hg-git/hggit/ >> "$HOME/.hgrc"
echo onsub = $CWD/lib/hg/onsub/onsub.py >> "$HOME/.hgrc"
echo allpaths = $CWD/lib/hg/allpaths/allpaths.py >> "$HOME/.hgrc"

# GIT
# ---
cp "$CWD/git/gitconfig" "$HOME/.gitconfig"

# WEB BROWSER
# -----------
ln -s "$CWD/pentadactylrc" "$HOME/.pentadactylrc"

