2 # texi-skeleton-update.py
9 sys.stderr.write ('texi-skeleton-update.py\n')
11 orig_skeletons = set ([os.path.basename (f) for f in glob.glob (sys.argv[1] + '/*.ite??')])
12 new_skeletons = set ([os.path.basename (f) for f in glob.glob (sys.argv[2] + '/*.ite??')])
14 for f in new_skeletons:
15 if f in orig_skeletons:
16 g = open (os.path.join (sys.argv[1], f), 'r').read ()
17 if '-- SKELETON FILE --' in g:
18 sys.stderr.write ("Updating %s...\n" % f)
19 shutil.copy (os.path.join (sys.argv[2], f), sys.argv[1])
20 elif f != 'fdl.itexi':
21 sys.stderr.write ("Copying new file %s...\n" % f)
22 shutil.copy (os.path.join (sys.argv[2], f), sys.argv[1])
24 for f in orig_skeletons.difference (new_skeletons):
25 sys.stderr.write ("Warning: outdated skeleton file %s\n" % f)