diff --git a/startup_hooks/install.sh b/startup_hooks/install.sh index 2867e6a..64a7942 100755 --- a/startup_hooks/install.sh +++ b/startup_hooks/install.sh @@ -3,7 +3,17 @@ # Yeah, my CSHENV Install script is written in Bourne shell. This is because # CSH isn't a great scripting language, but it is a nice interactive shell. -export CSHENV_LOCATION="~/cshenv" +export REALPATH=`realpath $0` +export INSTALLER_LOCATION=`dirname ${REALPATH}` +export CSHENV_LOCATION=`dirname ${INSTALLER_LOCATION}` +export RELATIVE_CSHENV_LOCATION=`realpath --relative-to=${HOME} ${CSHENV_LOCATION}` + +if [ -v CSHENV_DEBUG_INSTALLER ] +then + echo $CSHENV_LOCATION + echo $RELATIVE_CSHENV_LOCATION + exit +fi echo "Checking for ~/.login" if [ ! -e ~/.login ] @@ -36,8 +46,10 @@ then fi echo "Installing vim setup" -ln -s `echo ${CSHENV_LOCATION}`/vim ~/.vim -ln -s ~/.vim/vimrc ~/.vimrc +pushd ~ >& /dev/null +ln -s `echo ${RELATIVE_CSHENV_LOCATION}`/vim .vim +ln -s .vim/vimrc .vimrc +popd >& /dev/null if [ -e ~/.gitconfig ] then