summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-04-19 16:02:20 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-04-19 16:02:20 (GMT)
commitb4c93811cb385a3d114c82f860ed49bab3343c7b (patch)
tree66cb03684b8d567310a71da9eddf5d4acd49176d /Mac
parent3ba03b291fd09f8f97d23b5fed3168998c1812e1 (diff)
downloadcpython-b4c93811cb385a3d114c82f860ed49bab3343c7b.zip
cpython-b4c93811cb385a3d114c82f860ed49bab3343c7b.tar.gz
cpython-b4c93811cb385a3d114c82f860ed49bab3343c7b.tar.bz2
Copy .exp files to mwerks project directory too.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/scripts/binhextree.py33
1 files changed, 27 insertions, 6 deletions
diff --git a/Mac/scripts/binhextree.py b/Mac/scripts/binhextree.py
index 854a786..19faf40 100644
--- a/Mac/scripts/binhextree.py
+++ b/Mac/scripts/binhextree.py
@@ -4,11 +4,6 @@
#
# Jack Jansen, CWI, August 1995.
#
-# To do:
-# - Also do project files (.µ and .Ü), after using AppleEvents to the
-# various builders to clean the projects
-# - Don't hexbin (and clean) if there exists a .hqx file that is newer.
-#
import os
import binhex
@@ -138,11 +133,37 @@ def copycwproject(path, name):
else:
project_files[creator] = [fss]
+def copycwexpfile(path, name):
+ """Copy CW export file"""
+ global project_files
+
+ dstdir = os.path.join(TOP, CWDIR)
+ if not os.path.exists(dstdir):
+ print dstdir
+ print 'No CW-project dir, skip', name
+ return
+ dstfile = os.path.join(dstdir, name)
+ if dstfile[-6:] == '.µ.exp':
+ dstfile = dstfile[:-6]+'.mu.exp'
+ # Check that we're not in the dest directory
+ if dstfile == path:
+ return
+
+ # If the destination doesn't exists or is older that the source
+ # we copy and remember it
+
+ if os.path.exists(dstfile) and \
+ os.stat(dstfile)[8] > os.stat(path)[8]:
+ print 'Not copying', path,'- Up-to-date'
+ else:
+ print 'Copy', path
+ macostools.copy(path, dstfile)
extensions = [
('.rsrc', binhexit),
('.gif', binhexit),
- ('.µ', copycwproject)
+ ('.µ', copycwproject),
+ ('.µ.exp', copycwexpfile)
]
def walker(arg, top, names):