3 for tarball
in archive
/*/*/*.
tar.gz
; do
5 pkgdir
=$
(dirname ${tarball})
6 pkgname
=$
(basename ${tarball} .
tar.gz
)
8 if tar -tzf ${tarball} ${pkgname}/Setup.hs
2> /dev
/null
; then
9 tar -xzf ${tarball} ${pkgname}/Setup.hs -O > ${pkgdir}/Setup.hs
10 elif tar -tzf ${tarball} ${pkgname}/Setup.lhs
2> /dev
/null
; then
11 tar -xzf ${tarball} ${pkgname}/Setup.lhs -O > ${pkgdir}/Setup.lhs
13 echo "${pkgname} has no Setup.hs or .lhs at all!!?!"