2010-12-05 12:41:38 +01:00
|
|
|
#!/bin/bash
|
2010-06-30 20:59:12 +02:00
|
|
|
INSTALL_BASEFILE=`readlink -f $0`
|
2010-12-06 12:51:18 +01:00
|
|
|
if [ -z $INSTALL_BASEFILE ]; then
|
|
|
|
INSTALL_BASEFILE="$PWD/$0"
|
|
|
|
fi
|
2010-06-30 20:59:12 +02:00
|
|
|
INSTALL_BASEDIR=`dirname $INSTALL_BASEFILE`
|
|
|
|
|
2010-12-05 12:19:49 +01:00
|
|
|
CMD="ln -sfn"
|
2010-06-30 21:21:34 +02:00
|
|
|
|
2010-12-05 12:41:38 +01:00
|
|
|
function linkmy
|
|
|
|
{
|
2011-04-21 10:09:38 +02:00
|
|
|
install_file=$INSTALL_BASEDIR/$1
|
|
|
|
home_file=$HOME/$2
|
|
|
|
|
|
|
|
if [ -f $install_file ]
|
|
|
|
then
|
|
|
|
if [ ! -f $home_file ]
|
|
|
|
then
|
|
|
|
echo "Linking $install_file to $home_file"
|
|
|
|
$CMD $install_file $home_file
|
|
|
|
else
|
|
|
|
echo "$home_file already exists."
|
|
|
|
fi
|
|
|
|
elif [ -d $install_file ]
|
|
|
|
then
|
|
|
|
if [ ! -d $home_file ]
|
|
|
|
then
|
|
|
|
echo "Linking $install_file/ to $home_file/"
|
|
|
|
$CMD $install_file $home_file
|
|
|
|
else
|
|
|
|
echo "$home_file already exists."
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "Couldn't find $install_file"
|
|
|
|
fi
|
2010-12-05 12:41:38 +01:00
|
|
|
}
|
2010-07-01 22:28:59 +02:00
|
|
|
|
2011-03-17 11:18:05 +01:00
|
|
|
function copymy
|
|
|
|
{
|
|
|
|
echo "Copying $INSTALL_BASEDIR/$1 to $HOME/$2"
|
|
|
|
cp $INSTALL_BASEDIR/$1 $HOME/$2
|
|
|
|
}
|
|
|
|
|
2010-12-29 22:26:54 +01:00
|
|
|
# CONKY
|
|
|
|
linkmy conkyrc .conkyrc
|
2011-03-17 11:18:05 +01:00
|
|
|
copymy conky_box.lua .conky_box.lua
|
2010-12-05 12:41:38 +01:00
|
|
|
# EMACS
|
|
|
|
linkmy emacs .emacs
|
|
|
|
linkmy emacs.d .emacs.d
|
2011-04-21 10:09:38 +02:00
|
|
|
# GIT
|
|
|
|
linkmy gitconfig .gitconfig
|
|
|
|
linkmy git.d .git.d
|
2010-12-06 12:47:20 +01:00
|
|
|
# IRSSI
|
|
|
|
linkmy irssi .irssi
|
2011-01-11 13:50:07 +01:00
|
|
|
# MUTT
|
|
|
|
linkmy muttrc .muttrc
|
|
|
|
linkmy mutt .mutt
|
2010-12-06 12:47:20 +01:00
|
|
|
# NCMPCPP
|
|
|
|
linkmy ncmpcpp .ncmpcpp
|
2010-12-21 22:21:40 +01:00
|
|
|
# NEWSBEUTER
|
|
|
|
linkmy newsbeuter .newsbeuter
|
2011-01-11 13:43:17 +01:00
|
|
|
# OFFLINEIMAP
|
|
|
|
linkmy offlineimaprc .offlineimaprc
|
|
|
|
linkmy offlineimap.py .offlineimap.py
|
2010-12-05 12:44:54 +01:00
|
|
|
# VIM
|
|
|
|
linkmy vimrc .vimrc
|
|
|
|
linkmy vim .vim
|
2010-12-06 12:47:20 +01:00
|
|
|
# XDEFAULTS
|
|
|
|
linkmy Xdefaults .Xdefaults
|
2011-01-13 09:32:28 +01:00
|
|
|
# XINITRC
|
|
|
|
linkmy xinitrc .xinitrc
|
2011-03-07 09:05:49 +01:00
|
|
|
linkmy getrootname.sh .getrootname
|
2010-12-06 12:47:20 +01:00
|
|
|
# XMODMAP
|
|
|
|
linkmy Xmodmap .Xmodmap
|
2010-12-05 12:50:00 +01:00
|
|
|
# ZSH
|
|
|
|
linkmy zshrc .zshrc
|
|
|
|
linkmy zsh .zsh
|