Ken Moffat wrote: > 2009/9/12 Dan McGhee <[email protected]>: > > > If you do indeed need to specify the -j or -z because ubuntu is > running an old version of tar, I've no idea how to do it tersely - > I always structure my scripts verbosely with lots of ifs and so > forth. You can extract the file suffix (provided it starts with > a t and there isn't a preceding '.t' in the package name) with > something like > > suffix=$(echo $package | sed 's/^.*\.\(t.*\)/\1/') > > and then test $suffix for .tar, .tgz, .tar.gz, .tar.bz2, .tbz2. > > ĸen > Thank you very much, Ken. This is precisely something I wanted to do, but when it comes to sed, I've just copied and pasted. Suppose I better change my ways. Your suggestions removes any vagaries and is something that I'll incorporate.
Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
