1 |
#!/bin/bash |
2 |
file=$1 |
3 |
fileseul=$(basename $file) |
4 |
if [[ $fileseul == *.cpp ]] || [[ $fileseul == *.h ]]; |
5 |
then |
6 |
file2=$file"tmp" |
7 |
echo "//####//------------------------------------------------------------">$file2 |
8 |
echo "//####//------------------------------------------------------------">>$file2 |
9 |
echo "//####// MAGiC">>$file2 |
10 |
echo "//####// Jean Christophe Cuilliere et Vincent FRANCOIS">>$file2 |
11 |
echo "//####// Departement de Genie Mecanique - UQTR">>$file2 |
12 |
echo "//####//------------------------------------------------------------">>$file2 |
13 |
echo "//####// MAGIC est un projet de recherche de l equipe ERICCA">>$file2 |
14 |
echo "//####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres">>$file2 |
15 |
echo "//####// http://www.uqtr.ca/ericca">>$file2 |
16 |
echo "//####// http://www.uqtr.ca/">>$file2 |
17 |
echo "//####//------------------------------------------------------------">>$file2 |
18 |
echo "//####//------------------------------------------------------------">>$file2 |
19 |
echo "//####//">>$file2 |
20 |
echo "//####// "$fileseul>>$file2 |
21 |
echo "//####//">>$file2 |
22 |
echo "//####//------------------------------------------------------------">>$file2 |
23 |
echo "//####//------------------------------------------------------------">>$file2 |
24 |
echo "//####// COPYRIGHT 2000-$(date +%Y)">>$file2 |
25 |
echo "//####// Derniere modification par "$USER>>$file2 |
26 |
echo "//####// "$(date)>>$file2 |
27 |
echo "//####//------------------------------------------------------------">>$file2 |
28 |
echo "//####//------------------------------------------------------------">>$file2 |
29 |
cat $file | egrep -v '^(//)' >> $file2 |
30 |
mv $file2 $file |
31 |
fi |