legacy-dotfiles/install.sh
Tom Willemsen 9df6bb4922 EMACS: compile, htmlize, js, stumpwm
* install.sh tries to compile emacs.el before linking the emacs.elc
    to ~/. This is to always have a compiled .emacs.elc for speediest
    startup.
  * I removed a little bit of code from htmlize.el that was causing
    trouble with the naquadah theme.
  * I removed javascript-mode, because the built-in js-mode is better.
  * I Added stumpwm mode
  * When I save a file and it is in html-mode it will try and replace
    all occurrences of é with é before continueing.
2011-06-15 12:19:30 +02:00

86 lines
1.7 KiB
Bash
Executable file

#!/bin/bash
INSTALL_BASEFILE=`readlink -f $0`
if [ -z $INSTALL_BASEFILE ]; then
INSTALL_BASEFILE="$PWD/$0"
fi
INSTALL_BASEDIR=`dirname $INSTALL_BASEFILE`
CMD="ln -sfn"
function linkmy
{
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
}
function copymy
{
echo "Copying $INSTALL_BASEDIR/$1 to $HOME/$2"
cp $INSTALL_BASEDIR/$1 $HOME/$2
}
# CONKEROR
linkmy conkerorrc .conkerorrc
linkmy conkeror .conkeror
# CONKY
linkmy conkyrc .conkyrc
copymy conky_box.lua .conky_box.lua
# EMACS
linkmy emacs.el .emacs.el
emacs --script compile-emacs.el || return 1
linkmy emacs.elc .emacs.elc
linkmy emacs.d .emacs.d
# FONTS
linkmy fonts.conf .fonts.conf
# GIT
linkmy gitconfig .gitconfig
linkmy git.d .git.d
# IRSSI
linkmy irssi .irssi
# MUTT
linkmy muttrc .muttrc
linkmy mutt .mutt
# NCMPCPP
linkmy ncmpcpp .ncmpcpp
# NEWSBEUTER
linkmy newsbeuter .newsbeuter
# OFFLINEIMAP
linkmy offlineimaprc .offlineimaprc
linkmy offlineimap.py .offlineimap.py
# STUMPWM
linkmy stumpwmrc .stumpwmrc
# VIM
linkmy vimrc .vimrc
linkmy vim .vim
# XDEFAULTS
linkmy Xdefaults .Xdefaults
# XINITRC
linkmy xinitrc .xinitrc
linkmy getrootname.sh .getrootname
# XMODMAP
linkmy Xmodmap .Xmodmap
# ZSH
linkmy zshrc .zshrc
linkmy zsh .zsh