Exclude backup files (file~)
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Sun Mar 01 10:58:40 2009 +0000 (11 months ago)
changeset 21fed57df0c19c
parent 20 5c5f58a34d39
child 22 672b89eede77
Exclude backup files (file~)
dist.py
     1.1 --- a/dist.py	Sun Mar 01 00:08:48 2009 +0000
     1.2 +++ b/dist.py	Sun Mar 01 10:58:40 2009 +0000
     1.3 @@ -82,6 +82,8 @@
     1.4              return True
     1.5          if filename.endswith('.pyc') or filename.endswith('.pyo'):
     1.6              return True
     1.7 +        if filename.endswith('~'):
     1.8 +            return True
     1.9          return False
    1.10      print "Adding %s as %s" % (ns3_dir, os.path.join(dist_dir, new_ns3_dir))
    1.11      tar_add_tree(tar, ns3_dir, os.path.join(dist_dir, new_ns3_dir), dir_excl, file_excl)
    1.12 @@ -102,6 +104,8 @@
    1.13              return True
    1.14          if filename.endswith('.pyc') or filename.endswith('.pyo'):
    1.15              return True
    1.16 +        if filename.endswith('~'):
    1.17 +            return True
    1.18          return False
    1.19      print "Adding %s as %s" % (pybindgen_dir, os.path.join(dist_dir, new_pybindgen_dir))
    1.20      tar_add_tree(tar, pybindgen_dir, os.path.join(dist_dir, new_pybindgen_dir), dir_excl, file_excl)
    1.21 @@ -132,18 +136,20 @@
    1.22      def dir_excl(reldirpath, dirname):
    1.23          if dirname[0] == '.':
    1.24              return True
    1.25 -        # FIXME: which files or directories to exlcude for NSC?
    1.26 +        # FIXME: which files or directories to exclude for NSC?
    1.27          return False
    1.28      def file_excl(reldirpath, filename):
    1.29          if filename.startswith('.'):
    1.30              return True
    1.31 +        if filename.endswith('~'):
    1.32 +            return True
    1.33          return False
    1.34      print "Adding %s as %s" % (nsc_dir, os.path.join(dist_dir, new_nsc_dir))
    1.35      tar_add_tree(tar, nsc_dir, os.path.join(dist_dir, new_nsc_dir), dir_excl, file_excl)
    1.36  
    1.37  
    1.38      # add the build script files
    1.39 -    print "add the build script files"
    1.40 +    print "Adding the build script files"
    1.41      for filename in ["build.py", "constants.py", "util.py"]:
    1.42          tar.add(filename, os.path.join(dist_dir, filename))
    1.43