diff options
Diffstat (limited to 'updateCache.py')
| -rwxr-xr-x | updateCache.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/updateCache.py b/updateCache.py index 2dd7998..8e1af06 100755 --- a/updateCache.py +++ b/updateCache.py @@ -150,12 +150,14 @@ def downloadAll(bibtex, missingOnly=0): return errors -if len(sys.argv) == 2: - print "Loading from %s"%sys.argv[1] -else: - print >>sys.stderr, "Expected a single configuration file as an argument" - sys.exit(1) -config.load(sys.argv[1]) +if __name__ == '__main__': -bib = BibTeX.parseFile(config.MASTER_BIB) -downloadAll(bib,missingOnly=1) + if len(sys.argv) == 2: + print "Loading from %s"%sys.argv[1] + else: + print >>sys.stderr, "Expected a single configuration file as an argument" + sys.exit(1) + config.load(sys.argv[1]) + + bib = BibTeX.parseFile(config.MASTER_BIB) + downloadAll(bib,missingOnly=1) |
