diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-10-01 08:15:38 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-10-01 08:15:38 +0200 |
commit | ca981afbb42cd301f539697bcfa2fbd7257d75c5 (patch) | |
tree | 84bb0484fbaf1c8613510845fcbd36c81f51550f | |
parent | 8032980ea28d43be78ad8cc8ecfb5b94b527db9f (diff) | |
download | bin-ca981afbb42cd301f539697bcfa2fbd7257d75c5.zip bin-ca981afbb42cd301f539697bcfa2fbd7257d75c5.tar.gz |
update install script
-rwxr-xr-x | install | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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 |