diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-04-10 18:15:18 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-04-10 18:15:18 +0200 |
commit | 31d57e6191a51b64bb0141cdc6b9aef849977208 (patch) | |
tree | f81db7bcab6358e06610848ea3a960102d2dfaab /bootstrap.py | |
parent | aa3efbff633b3a37ef0b10f14e35af5f58b68bb6 (diff) | |
parent | 301edd26f23e3d954dcea5cffc1ad13f969822ca (diff) |
Merge tag 'upstream/2.5.0+repack'
Upstream version 2.5.0+repack
Diffstat (limited to 'bootstrap.py')
-rwxr-xr-x | bootstrap.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bootstrap.py b/bootstrap.py index ee58add..26ef90e 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright (c) 2001 - 2015 The SCons Foundation +# Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,6 +27,8 @@ import os.path import sys import glob import subprocess +import filecmp +import shutil __doc__ = """bootstrap.py @@ -127,7 +129,7 @@ def main(): def must_copy(dst, src): if not os.path.exists(dst): return 1 - return open(dst, 'rb').read() != open(src, 'rb').read() + return not filecmp.cmp(dst,src) # Note: We don't use the getopt module to process the command-line # arguments because we'd have to teach it about all of the SCons options. @@ -195,7 +197,8 @@ def main(): os.makedirs(dir) try: os.unlink(dst) except: pass - open(dst, 'wb').write( open(src, 'rb').read() ) + + shutil.copyfile(src,dst) if update_only: sys.exit(0) |