On 13 Apr 2002, Mike Noyes wrote:
> On Sat, 2002-04-13 at 09:06, Brad Fritz wrote:
> >
> > On 13 Apr 2002 08:33:44 PDT Mike Noyes wrote:
> >
> > > Anyone,
> > > Is there a way to get tar to return the date of the most recent file in
> > > a tarball?
> > >
> > > Example:
> > > $ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp
> > > -rwxr-xr-x root/root 9648 2001-12-17 06:42:08 usr/bin/cal
> > > -rw-r--r-- root/root 32 2001-12-17 06:42:21
> > > var/lib/lrpkg/cal.list
> > >
> > > Desired output: 2001-12-17
> >
> > If you can't get tar to tell you directly,
> >
> > tar tvfz $TARBALL_FILE \
> > | awk '{print $4}' \
> > | sort -n \
> > | tail -n 1
> >
> > might work for you.
>
> Brad,
> Thanks. This works fairly well. I still get errors from tar, but I don't
> see any way to force it to ignore them.
perhaps
tar tvfz $TARBALL_FILE 2>/dev/null \
| awk '{print $4}' \
| sort -n \
| tail -n 1
[...]
> Now all I have to do is get the program name and version. Then determine
> the libc version with ldd.
>
> Jeff provided this snippet for checking the libc version with ldd.
>
> md ${package}
> cd ${package}
> gunzip ${packagelrppath}
> ldd `ls bin/* sbin/* usr/bin usr/sbin usr/local/bin usr/local/sbin` \
> | grep -v ':$' | sort | uniq
> cd ..
> rm -R ${package}
perhaps
#!/bin/sh
TMPDIR=/tmp/lrpdd
ORIGDIR=`pwd`
if [ "" == "$1" ]; then
echo "usage : lrpldd lrpfilename"
elif [ -r "$1" ]; then
mkdir $TMPDIR
cd $TMPDIR
tar xzf $1
find . -type f -exec ldd \{} \; 2>/dev/null \
| grep -v ':$' | sort | uniq
cd $ORIGDIR
rm -R $TMPDIR
else
echo "lrpldd : \"$1\" not found"
fi
would be more effective? If I provided that snippet verbatim, I must have
been sleepy.... :)
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<[EMAIL PROTECTED]> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...2k
---------------------------------------------------------------------------
_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel