From ca981afbb42cd301f539697bcfa2fbd7257d75c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 1 Oct 2012 08:15:38 +0200 Subject: update install script --- install | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/install b/install index 8d8b31a..206cac4 100755 --- a/install +++ b/install @@ -2,9 +2,10 @@ DEST_DIR=$HOME/bin -rm *~ +rm *~ 2>/dev/null for f in *; do - [ "$f" == "install" ] && continue + # TODO check within a list with grep + [ "$f" == "install" -o "$f" == "bashrc" ] && continue ff=$(readlink -f $f) if [ ! -e $DEST_DIR/$f ]; then echo "symlink $DEST_DIR/$f" && ln -s $ff $DEST_DIR/$f @@ -15,3 +16,15 @@ for f in *; do fi fi done + +for f in "bashrc"; do + ff=$(readlink -f $f) + if [ ! -e $HOME/.$f ]; then + echo "symlink $HOME/$f" && ln -s $ff $HOME/.$f + else + bf=$(readlink -e $HOME/.$f) + if [ "$bf" != "$ff" ]; then + echo "$bf is not OK" + fi + fi +done -- cgit v1.1-2-g2b99