question about case command in lfs6.6 chap5.4

Andrew Benton b3nton at gmail.com
Tue Mar 9 05:00:50 PST 2010


On 09/03/10 12:08, stosss wrote:
> Linux From Scratch - Version 6.6
> Chapter 5. Constructing a Temporary System
>
> 5.4. Binutils-2.20 - Pass 1
>
> 5.4.1. Installation of Cross Binutils
>
> case $(uname -m) in
>    x86_64) mkdir -v /tools/lib&&  ln -sv lib /tools/lib64 ;;
> esac
>
> Is the command above correct? There is only one ( but there are two ) .

Looks fine to me.
This command says if uname-m = x86_64 then make a symbolic link, /tools/lib64 pointing
at /tools/lib so that all the libraries go into /tools/lib. It could be written

if [[ $(uname -m) = x86_64 ]]; then
	mkdir -v /tools/lib &&
	ln -sv lib /tools/lib64
fi

Andy



More information about the lfs-support mailing list