eqemu-server/libs/evt-tls/prepend_licence.py
2016-10-11 21:34:26 -07:00

23 lines
693 B
Python

#!/usr/bin/env python
import sys
LICENSE = '''
//%LICENSE////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2015 Devchandra M. Leishangthem (dlmeetei at gmail dot com)
//
// Distributed under the MIT License (See accompanying file LICENSE)
//
//////////////////////////////////////////////////////////////////////////
//
//%///////////////////////////////////////////////////////////////////////////
'''
if len(sys.argv) < 2:
sys.stderr.write('usage: ' + sys.argv[0] + ' file\n' )
sys.exit(1)
#if len
with file(sys.argv[1], 'r') as original: data = original.read()
with file(sys.argv[1], 'w') as modified: modified.write(LICENSE + '\n' + data)