Skip to content

Instantly share code, notes, and snippets.

@Voker57
Created September 2, 2010 19:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save Voker57/562813 to your computer and use it in GitHub Desktop.
Save Voker57/562813 to your computer and use it in GitHub Desktop.
#!/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