<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>If you find your Cygwin links don't work (eg. some
commands do nothing or get stuck in a loop):</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>For some reason, my latest Cygwin install created
nonworking links. </FONT><FONT face=Arial size=2>So I converted each tiny file
containing <symlink> at the start to a real symlink. It's simple enough to
write that I'm not sure it's worth posting, nor if anyone else has seen this
same problem, but here it is. There's no error-checking; use at your own risk.
200 is arbitrary, and a bit large, but it seems reasonably safe to assume that a
file starting with <symlink> less than 200 bytes is supposed to be a
symlink (not a regular file).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$ cd / ; find . -xdev -name "*bin" -type d
-exec sh -c 'echo {}; cd {}; fixlinks.pl' \;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$ cat
/usr/bin/fixlinks.pl<BR>#!perl<BR>while($filename =
<*>)<BR>{<BR>
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,<BR>
$atime,$mtime,$ctime,$blksize,$blocks)<BR>
= stat($filename);<BR> if ($size <
200 && (($mode & (S_IFREG | S_IFLNK)) == S_IFREG)
)<BR>
{<BR>
open FH,
"<$filename";<BR>
$firstline =
<FH>;<BR>
close
FH;<BR>
chomp
$firstline;<BR>
if ($firstline =~
/^\!\<symlink\>(.*)/)<BR>
{<BR>
print "ln -s $1
$filename\n";<BR>
unlink
$filename;<BR>
symlink $1,
$filename;<BR>
}<BR>
}<BR>}</FONT></DIV></BODY></HTML>