diff --git a/hererocks.py b/hererocks.py index 10f51f1..51d4283 100755 --- a/hererocks.py +++ b/hererocks.py @@ -175,7 +175,7 @@ class Program(object): def fetch_repo(self, ref): message = "Cloning {} from {} @{}".format(self.title, self.repo, ref) - if self.repo == self.default_repo: + if self.repo == self.default_repo and not opts.no_git_cache: # Default repos are cached. if not os.path.exists(opts.downloads): os.makedirs(opts.downloads) @@ -618,12 +618,13 @@ def main(): default=get_default_lua_target()) parser.add_argument("--downloads", # help="Cache downloads in 'DOWNLOADS' directory.", - help=argparse.SUPPRESS, - default=get_default_cache()) + help=argparse.SUPPRESS, default=get_default_cache()) + parser.add_argument("--no-git-cache", + # help="Do not cache default git repos.", + help=argparse.SUPPRESS, action="store_true", default=False) parser.add_argument("--builds", # help="Cache Lua and LuaJIT builds in 'BUILDS' directory.", - help=argparse.SUPPRESS, - default=None) + help=argparse.SUPPRESS, default=None) parser.add_argument("--verbose", default=False, action="store_true", help="Show executed commands and their output.") parser.add_argument("-v", "--version", help="Show program's version number and exit.", diff --git a/test.sh b/test.sh index be5b33a..249d5c1 100755 --- a/test.sh +++ b/test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -ev export PATH="$PWD/test/here/bin:$PATH" -HEREROCKS="python hererocks.py test/here --downloads=test/cache" +HEREROCKS="python hererocks.py test/here --downloads=test/cache --no-git-cache" rm test/here -rf $HEREROCKS -l^ -r^