Browse Source

Rename $1 to random name and relink it to softlink $2

Herbert Vojcik 12 years ago
parent
commit
a97bb53816
1 changed files with 9 additions and 0 deletions
  1. 9 0
      bin/relndir

+ 9 - 0
bin/relndir

@@ -0,0 +1,9 @@
+#!/bin/sh
+while true; do
+  RND=`rnd`
+  if [ -e $RND ]; then continue; fi
+  mv $1 $RND
+  ln -sFfh $RND $2
+  rm -rf `ls | grep -v $RND | grep -v '^vendor$'`
+  break
+done