Last change
on this file since 2278:a61b7f4534c7 was
2171:f40343b498ef,
checked in by Alpar Juttner, 18 years ago
|
This script creates/updates the copyright header of a source file
|
|
File size:
882 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | FILE_NAME=$1 |
---|
4 | TMP_FILE=`mktemp` |
---|
5 | YEAR='2003-2006' |
---|
6 | |
---|
7 | (echo "/* -*- C++ -*- |
---|
8 | * |
---|
9 | * This file is a part of LEMON, a generic C++ optimization library |
---|
10 | * |
---|
11 | * Copyright (C) "$YEAR" |
---|
12 | * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
---|
13 | * (Egervary Research Group on Combinatorial Optimization, EGRES). |
---|
14 | * |
---|
15 | * Permission to use, modify and distribute this software is granted |
---|
16 | * provided that this copyright notice appears in all copies. For |
---|
17 | * precise terms see the accompanying LICENSE file. |
---|
18 | * |
---|
19 | * This software is provided \"AS IS\" with no warranty of any kind, |
---|
20 | * express or implied, and with no claim as to its suitability for any |
---|
21 | * purpose. |
---|
22 | * |
---|
23 | */ |
---|
24 | " |
---|
25 | awk 'BEGIN { pm=0; } |
---|
26 | pm==3 { print } |
---|
27 | /\/\* / && pm==0 { pm=1;} |
---|
28 | /[^:blank:]/ && (pm==0 || pm==2) { pm=3; print;} |
---|
29 | /\*\// && pm==1 { pm=2;} |
---|
30 | ' $1 |
---|
31 | ) >$TMP_FILE |
---|
32 | rm $FILE_NAME |
---|
33 | mv $TMP_FILE $FILE_NAME |
---|
Note: See
TracBrowser
for help on using the repository browser.