Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
echo "Cleaning up..."
rm 00-index.tar.gz
mkdir -p package
echo "Downloading index..."
wget http://hackage.haskell.org/packages/archive/00-index.tar.gz
for splitpk in `tar tf 00-index.tar.gz | cut -d/ -f 2,3`; do
pk=`echo $splitpk | sed 's|/|-|'`
name=$pk.tar.gz
if [ ! -a package/$name ]; then
wget http://hackage.haskell.org/packages/archive/$splitpk/$name -O package/$name
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment