crosstool enhancement

Roman Duka rduka@mail.ru
Fri Feb 13 00:45:00 GMT 2004


Daniel Kegel wrote:
> Roman Duka wrote:
> 
>> Dan I've just noticed the following comment in crosstool.sh file on 
>> lines 304-305
>>
>> # Any file in a list of known suspects that isn't a symlink is assumed 
>> to be a linker script.
>> # FIXME: test -h is not portable
>>
>> well I had the same problem, and I think this is a sure way to solve it:
>>
>> file -b /some_path/some_file | grep 'symbolic link' > /dev/null
>> issymlink=$?
> 
> 
> Yeah, that'd do it.  What environment were you in
> where test -h failed?   Do shell functions work in
> that environment?  Do you want to build crosscompilers
> there?
> 
> Thanks,
> Dan
> 
> 

well it has nothing to do with crosstool in particular, i'm building my 
own Linux distro and I do a lot of shell scripting, i was writing some 
shell scripts for my initrd (Initial Ramdisk) which runs on busybox, 
busybox has "ash" shell built in, but i don't think it supports "test 
-h" i haven't tested it yet, it does support functions etc. i just found 
a way to test for symbolic links with usual tools like "file" and "grep" 
because like you say, "test -h" isn't portable, bash has it, but other 
shells may not have it.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list