summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-10-01 08:15:38 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-10-01 08:15:38 +0200
commitca981afbb42cd301f539697bcfa2fbd7257d75c5 (patch)
tree84bb0484fbaf1c8613510845fcbd36c81f51550f /install
parent8032980ea28d43be78ad8cc8ecfb5b94b527db9f (diff)
downloadbin-ca981afbb42cd301f539697bcfa2fbd7257d75c5.zip
bin-ca981afbb42cd301f539697bcfa2fbd7257d75c5.tar.gz
update install script
Diffstat (limited to 'install')
-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