thor-os/add_license.bash
2013-11-07 10:07:33 +01:00

21 lines
432 B
Bash

for file in "$@"
do
lines=`grep "Distributed under the Boost Software License" $file | wc -l`
if [[ $lines == 0 ]]
then
cp ${file} ${file}.orig
asm=`echo $file | grep ".asm" | wc -l`
if [[ $asm == 0 ]]
then
cat cpp_license_header ${file}.orig > ${file}
else
cat asm_license_header ${file}.orig > ${file}
fi
rm ${file}.orig
fi
done