]> err.no Git - dotfiles/commitdiff
second try
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Wed, 16 Oct 2002 00:26:17 +0000 (00:26 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Wed, 16 Oct 2002 00:26:17 +0000 (00:26 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@72 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

link-dotfiles

index badbf97f1b1f788591d65660089c38bc26486728..e56cac7f4e6a00649d2565c224a0f19bd3d00b99 100755 (executable)
@@ -22,36 +22,37 @@ linkdir () {
     for file in $1/*; do
         file=`basename $file`
         if test -d  "$1/$file"; then
-            if ! test -d "$2/.$file"; then
-                mkdir $2/.$file
+            if ! test -d "$2/$DOT$file"; then
+                mkdir $2/$DOT$file
             fi
-            linkdir $1/$file $2/.$file
+            local DOT=
+            linkdir $1/$file $2/$DOT$file
             continue
         elif ! test -f "$1/$file"; then
             continue
         fi
-        if test -f $2/.$file; then
-            C_MD5SUM=`$MD5SUM < $2/.$file | awk '{print $1}'`
+        if test -f $2/$DOT$file; then
+            C_MD5SUM=`$MD5SUM < $2/$DOT$file | awk '{print $1}'`
             N_MD5SUM=`$MD5SUM < $1/$file | awk '{print $1}'`
             if test "$C_MD5SUM" = "$N_MD5SUM"; then
-                rm -f $2/.$file
+                rm -f $2/$DOT$file
             else
                 found=0
                 for md5 in $KNOWNMD5SUMS; do
                     if [ "$md5" = "$C_MD5SUM" ]; then
-                        rm -f $2/.$file
+                        rm -f $2/$DOT$file
                         found=1
                         break
                     fi
                 done
                 if [ "$found" = "0" ]; then
-                    echo "$2/.$file different from $1/$file, not known ok, and not symlink: skipping"
+                    echo "$2/$DOT$file different from $1/$file, not known ok, and not symlink: skipping"
                     continue
                 fi
             fi
         fi
-        ln -s $1/$file $2/.$file
+        ln -s $1/$file $2/$DOT$file
     done
 }
-
+DOT=.
 linkdir $DOTFILESDIR $HOME