delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/11/10:48:37

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: 11 Feb 2003 15:46:01 -0000
To: cygwin AT cygwin DOT com
Subject: RE: Re: Changing symlinks from
From: Christopher January <chris AT atomice DOT net>
Reply-To: Christopher January <chris AT atomice DOT net>
CC:
x-message-flag: PlusMail
Message-ID: <20030211154601.atomice@plus.net>
MIME-Version: 1.0

--=_f42dc9bab933dc8acf42a89fee51c47f
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit

>On Tue, Feb 11, 2003 at 01:05:06PM -0000, Christopher January wrote:
>> How can I automatically convert all symlinks on my Cygwin filesystem
from
>> the "!<symlink>" format to windows shortcuts? Samba doesn't seem to
>> maintain the correct permissions for the Cygwin DLL to detect the
>> "!<symlink>" files as symlinks, so they are treated as regular files
>> (hence the errors with gcc, etc. I was seeing). Thanks Chris and others
>> for pointing me in the right direction to diagnose this. I now need a
way
>> of converting all those symlink files to windows shortcuts so I can use
>> Cygwin at college.
>> Chris
>
>Write a script which reads the content of the symlink, then removes the
>old one and eventually recreates it.  The resulting symlink will have the
>appropriate format according to the CYGWIN env. var.  Sth like this
>
>  for i in `find / -type l`
>  do
>    TARGET=`ls -l $i | awk '{print $NF;}'`
>    rm $i
>    ln -s $TARGET $i
>  done
For the record, the script I used was:
#!/usr/bin/env bash
here=$PWD
echo "here=$PWD"
IFS=$'\n'
grep -r -l '^\!<symlink>\(.*\)\x00' / | while read -r file;
do
	dir="`dirname "$file"`"
	file="`basename "$file"`"
	cd $dir
	dest="`sed 's/\!<symlink>\(.*\)\x00/\1/g' "$file"`"
	rm $file
	ln -s $dest $file
	cd $here
done

Now I can run gcc hopefully I can patch Cygwin to run at a tolerable speed
on this setup!

Chris



--=_f42dc9bab933dc8acf42a89fee51c47f
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--=_f42dc9bab933dc8acf42a89fee51c47f--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019