Last active
August 29, 2015 14:07
-
-
Save thomie/260755a5ab79f020fb79 to your computer and use it in GitHub Desktop.
GHC: test binary blobs solution with libff-tarballs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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