1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 22:55:10 +01:00

Added creation of symlinks

This commit is contained in:
Michiel Scholten
2014-08-11 16:40:24 +02:00
parent 56cb8f59ab
commit 6890d94a65

View File

@@ -24,8 +24,35 @@ install_hg()
done
}
# Get the directory the dotfiles have been cloned into
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
echo "Installing from $DIR"
DATETIME=`date +%Y%m%d_%H%M`
# Go home
cd
# Symlink all the things
for TARGET
in .bash_aliases .bashrc bin .gitconfig .gitmodules .hgauthors.txt .hgignore .hgrc .screenrc .terminfo .tmux.conf .vim .vimrc
do
echo $TARGET
if [ -l $TARGET ]; then
echo "symlink exists, skipping"
elif [ -e $TARGET ]; then
echo "exists, moving"
if [ ! -d "workspace/backup/$DATETIME" ];
mkdir -p "workspace/backup/$DATETIME"
fi
#mv $TARGET "workspace/backup/$DATETIME/${TARGET}"
echo "workspace/backup/$DATETIME/${TARGET}"
fi
#ln -s
#ln -s $DIR/$TARGET
echo "ln -s $DIR/$TARGET"
done
# Test
exit 1
echo "INFO: Init submodules"
git submodule init