blob: b6080f013f9e22f8a3f757a09674ed155a4f917c [file] [log] [blame]
Rushabh Mehta2886b952012-02-24 11:26:31 +05301license = """ERPNext - web based ERP (http://erpnext.com)
2Copyright (C) 2012 Web Notes Technologies Pvt Ltd
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 3 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>."""
16
17license2 = """Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
18
19MIT License (MIT)
20
21Permission is hereby granted, free of charge, to any person obtaining a
22copy of this software and associated documentation files (the "Software"),
23to deal in the Software without restriction, including without limitation
24the rights to use, copy, modify, merge, publish, distribute, sublicense,
25and/or sell copies of the Software, and to permit persons to whom the
26Software is furnished to do so, subject to the following conditions:
27
28The above copyright notice and this permission notice shall be included in
29all copies or substantial portions of the Software.
30
31THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
32INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
33PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
34HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
35CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37"""
38
39
40if __name__=='__main__':
41 import os
Rushabh Mehtab43f9492012-04-08 20:33:51 +053042 #clicense = '\n'.join([('# ' + l) for l in license2.split('\n')])
43 cnt = 0
44 for wt in os.walk('.'):
Rushabh Mehta2886b952012-02-24 11:26:31 +053045 for fname in wt[2]:
Rushabh Mehtab43f9492012-04-08 20:33:51 +053046 if fname.endswith('.js'):
47 cnt += 1
48 #path = os.path.join(wt[0], fname)
49 #with open(path, 'r') as codefile:
50 # codetxt = codefile.read()
Rushabh Mehta2886b952012-02-24 11:26:31 +053051
Rushabh Mehtab43f9492012-04-08 20:33:51 +053052 #if codetxt.strip():
53 # with open(path, 'w') as codefile:
54 # codefile.write(clicense + '\n\n' + codetxt)
Rushabh Mehta2886b952012-02-24 11:26:31 +053055
Rushabh Mehtab43f9492012-04-08 20:33:51 +053056 # print 'updated in ' + path
57 print cnt