blob: fee98904afa5dcd4e5710f25849dfa6f63449a60 [file] [log] [blame]
Chetan Gaonkercfcce782016-05-10 10:10:42 -07001#!/usr/bin/env bash
2for f in `find . -name "*.py"`; do
3 if ! grep -q Copyright $f; then
4 cat COPYRIGHT.txt $f > $f.license.py
5 mv $f.license.py $f
Chetan Gaonker89a2e322016-05-10 13:21:56 -07006 if grep -q "^\#\!/usr/bin" $f; then
7 #prepend shebang for python
8 sed -i -e '/^\#\!\/usr\/bin/d' -e '1i\#\!/usr/bin/env python' $f
9 chmod +x $f
10 fi
Chetan Gaonkercfcce782016-05-10 10:10:42 -070011 fi
Chetan Gaonkercb122cc2016-05-10 10:58:34 -070012done