~ubuntu-branches/ubuntu/wily/steam/wily

« back to all changes in this revision

Viewing changes to debian/scripts/copyright-helper

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-10-29 19:51:18 UTC
  • mfrom: (1.1.4) (0.1.4 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20131029195118-b9bxciz5hwx5z459
Tags: 1:1.0.0.39-2ubuntu1
Add an epoch to the version number as there was an unrelated steam package
in the archive with a higher version number.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
# Copyright (C) 2013 Michael Gilbert <mgilbert@debian.org>
 
3
# License: MIT
 
4
 
 
5
import sys
 
6
 
 
7
if len( sys.argv ) < 3:
 
8
    sys.stderr.write( 
 
9
            'usage: %s <minified copyright file> <debian copyright file>\n'
 
10
            % sys.argv[0] )
 
11
    sys.exit( 1 )
 
12
 
 
13
mincopyright = open( sys.argv[1] , 'r' )
 
14
copyright = open( sys.argv[2] , 'w' )
 
15
for cline in mincopyright.readlines():
 
16
    if cline.strip().startswith( 'License-File:' ):
 
17
        info = cline.split()
 
18
        start = 0
 
19
        if len( info ) > 2:
 
20
            start = int( info[2] )
 
21
        license = open( info[1] , 'rU' ) # U does dos2unix
 
22
        for line in license.readlines()[start:]:
 
23
             copyright.write( line )
 
24
#            if line.strip() == '':
 
25
#                copyright.write( ' .\n' )
 
26
#            else:
 
27
#                copyright.write( ' ' )
 
28
#                copyright.write( line )
 
29
        license.close()
 
30
    else:
 
31
        copyright.write( cline )
 
32
mincopyright.close()
 
33
copyright.close()