2009/9/12 Ken Moffat <[email protected]>:

>
> DIRECTORY=`tar -tv $TARCMD -f ${PACKAGES}/${CURRENT}  | head -n 1 |
> awk '{ print $6}' | sed s'@^./@@' | \
>                cut -d '/' -f 1`
> if [ -z $DIRECTORY ]; then
> echo "indentify: error in trying to determine directory name"
>                exit 1
> fi

 /me swears at googlemail and evdev - I was trying to format that
nicely (ggoglemail doesn't seem to want to let tabs into the
text) and soemthing, perhaps the tab key, triggered an event
storm which among other things caused the mail to be sent.

 Hopefully, my choice of variable names is fairly self-explanatory.
$TARCMD is -j or -v (that part of my scripts goes back to when some
of my systems were running old versions of tar where it had to be
specified).

 When you go beyond LFS you'll find there are a significant number
of packages where the directory name is not identical to the tarball
name.

 Pedantically, the test for the error ought to be in double quotes
but it doesn't really matter.

ĸen



-- 
After tragedy, and farce, "OMG poneys!"
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to