Make Markdown example a code block
[cabal.git] / Cabal-tests / tests / hackage / unpack.sh
blob8155f7ee92b57a22e1231277e174d024ec071403
1 #!/bin/sh
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
12 else
13 echo "${pkgname} has no Setup.hs or .lhs at all!!?!"
16 done