summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstall17
1 files 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