Mercurial > mozilla > hg > licenser
changeset 12:697b6f892e12
get this working in basic form
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 23 Nov 2011 13:56:35 -0800 |
parents | a8ad01735f71 |
children | c324ae5317ab |
files | licenser/licenses.py licenser/main.py |
diffstat | 2 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/licenser/licenses.py Tue Nov 22 17:41:21 2011 -0800 +++ b/licenser/licenses.py Wed Nov 23 13:56:35 2011 -0800 @@ -149,7 +149,7 @@ contributor_index = index assert contributor_index - lines[contibutor_index] = ' ${author} <${email}>' + lines.insert(contributor_index+1, ' ${author} <${email}>') return '\n'.join(lines) def pre(self, variables):
--- a/licenser/main.py Tue Nov 22 17:41:21 2011 -0800 +++ b/licenser/main.py Wed Nov 23 13:56:35 2011 -0800 @@ -2,27 +2,27 @@ # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 -# +# # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://www.mozilla.org/MPL/ -# +# # Software distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License # for the specific language governing rights and limitations under the # License. -# +# # The Original Code is mozilla.org code. -# +# # The Initial Developer of the Original Code is # Mozilla.org. # Portions created by the Initial Developer are Copyright (C) 2010 # the Initial Developer. All Rights Reserved. -# +# # Contributor(s): # Jeff Hammel <jhammel@mozilla.com> (Original author) -# +# # Alternatively, the contents of this file may be used under the terms of # either of the GNU General Public License Version 2 or later (the "GPL"), # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -34,7 +34,7 @@ # and other provisions required by the GPL or the LGPL. If you do not delete # the provisions above, a recipient may use your version of this file under # the terms of any one of the MPL, the GPL or the LGPL. -# +# # ***** END LICENSE BLOCK ***** """ adds licenses to python packages @@ -71,9 +71,7 @@ def main(args=sys.argv[1:]): usage = '%prog [options] directory' parser = OptionParser(usage, description=__doc__) -# parser.add_option('-d', '--debug', action='store_true', default=False, -# help="debug the application") - parser.add_option('-l', '--license', + parser.add_option('-l', '--license', dest='license', default='MPL', help="license to use") parser.add_option('--list', action='store_true', default=False, help="list available licenses")