This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: change just host of cross compiler


lazer1 wrote:
next problem: I dont understand the output of "ln --help",

eg it says: "ln [OPTION]... TARGET [LINK_NAME]" and says LINK_NAME is optional. I dont get that, how can you link something to nothing, surely you need a source + a dest??

for the general situation I am going to have to skip the options,

The help text really is just a quick reference; you need the real doc. Try 'man ln'.

if I do

cp -r x y

and y already exists and x is a directory it appears to create y/x/...

so I may need to do

rmdir y

first,

If y has stuff in it, rmdir won't touch it. You need 'rm -rf y' instead. However, I don't think they use ln on directories during the install.

would the following be sufficient for tar.gz decompressions and configure scripts:

#!/bin/sh

rm $2
rmdir $2
cp -r $2 $1

or will they sometimes use options?

Again, use the grep! I just ran 'grep ln' on the log file from a toolchain build, and it looks like only two forms are used: ln -s file1 file2 ln file1 file2

is there a trick to access the last 2 arguments,
thinking of $(argc-2) and $(argc-1), not sure how you would do that in shell-speak, that way I could skip the options without knowing how to,

The man page for sh, or the stadard doc at http://www.unix.org/single_unix_specification/ but you might be able to get by with

case $1 in
-s) shift;;
*) ;;
esac
cp -f $1 $2

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]