Skip to content

Instantly share code, notes, and snippets.

@thomie
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomie/260755a5ab79f020fb79 to your computer and use it in GitHub Desktop.
Save thomie/260755a5ab79f020fb79 to your computer and use it in GitHub Desktop.
GHC: test binary blobs solution with libff-tarballs
set -e
# ghc-tarballs contains big binary blobs. Windows developers really
# only need the latest version of it. One solution is to not use git,
# but just wget the files from some server.
# This is a git solution, which has the advantage that the full
# history of ghc-tarballs is tracked, while still only downloading
# the latest version initial.
rm -rf testrepo*
# Create a repo and a submodule with update=none
mkdir testrepo
cd testrepo
git init -q
git submodule add -q file:////home/thomas/ghc-master/libffi-tarballs
git config -f .gitmodules submodule.libffi-tarballs.update none
git commit -q -a -m add
cd ../
# Clone it
git clone -q --recursive testrepo testrepo-clone
# Compare: because of update=none, testrepo-clone doesn't have libffi-tarballs
echo
du -hs testrepo*
# WINDOWS ONLY
cd testrepo-clone
git config submodule.libffi-tarballs.update checkout
git submodule update -q --depth=1
cd ../
# END WINDOWS ONLY
# Compare: because of depth=1, testrepo-clone is still smaller
echo
du -hs testrepo*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment