#!/bin/sh cat < expected_changes 8c8,9 < -- Copyright (C) 2002-2016, Frank Singhoff, Alain Plantec, Jerome Legrand --- > -- Copyright (C) 2002-2020, Frank Singhoff, Alain Plantec, Jerome Legrand, > -- Hai Nam Tran, Stephane Rubini 11c12 < -- Frank Singhoff, Lab-STICC UMR 6285 laboratory, Université de Bretagne Occidentale --- > -- Frank Singhoff, Lab-STICC UMR 6285, Universite de Bretagne Occidentale END cd $CHEDDAR_DIR/src find . -name "*.ad[bs]" -print | while read file ; do if grep -q 'This source file was automatically generated by Platypus' $file ; then echo "$file : Platypus genrated file. Skip" elif grep -q 'Copyright (C)' $file ; then if grep -q 'LISyC' $file ; then echo "$file : LISyC header" cat $file | sed '1,38 d' > $file.tmp2 cat ../COPYING.txt $file.tmp2 > $file.tmp mv $file.tmp $file rm $file.tmp2 else cat $file | \ sed '/Copyright (C) 2002-2016/a -- Hai Nam Tran, Stephane Rubini' | \ sed '/Copyright (C) 2002-2016/c -- Copyright (C) 2002-2020, Frank Singhoff, Alain Plantec, Jerome Legrand,' | \ sed '/Lab-STICC UMR 6285 laboratory/s/Lab-STICC UMR 6285 laboratory/Lab-STICC UMR 6285/' > $file.tmp mv $file.tmp $file echo $file #diff $file $file.tmp > $CHEDDAR_DIR/src/scripts/changes #if cmp $CHEDDAR_DIR/src/scripts/expected_changes $CHEDDAR_DIR/src/scripts/changes ; then # echo $file # mv $file.tmp $file #else # echo "Please check $file" #fi fi else echo "$file : no copyright. Append it" cat ../COPYING.txt $file > $file.tmp mv $file.tmp $file fi done