How to script automate unTAR of packages

Andres P 97.56.04 at
Mon Dec 28 13:32:01 PST 2009

On Mon, Dec 28, 2009 at 3:50 PM, Mikie <kmb at> wrote:
> #!/bin/sh
> for file in /mnt/lfs/sources/*.tar*; do
>  tar xvf $file
> done
> Since this is so simple ... can I do this on a command line?


for file in /mnt/lfs/sources/*.tar*; do tar xvf $file; done

You will probably find useful using Arch Linux's makepkg tool for
compiling/extracting/checking md5sums automatically.

I'm currently porting Crux's very similar script, pkgadd, to sh for
my next LFS build.

They use very transparent files for building, unlike Debian's and other
distro's very complicated .spec files.


More information about the lfs-support mailing list