| 1 | 1 |
#!/bin/bash |
| 2 | 2 |
|
| 3 |
YEAR=`date + |
|
| 3 |
YEAR=`date +%Y` |
|
| 4 | 4 |
HGROOT=`hg root` |
| 5 | 5 |
|
| 6 |
function hg_year() {
|
|
| 7 |
if [ -n "$(hg st $1)" ]; then |
|
| 8 |
echo $YEAR |
|
| 9 |
} |
|
| 10 |
|
|
| 6 | 11 |
# file enumaration modes |
| 7 | 12 |
|
| 8 | 13 |
function all_files() {
|
| 9 | 14 |
hg status -a -m -c | |
| 10 | 15 |
cut -d ' ' -f 2 | grep -E '(\.(cc|h|dox)$|Makefile\.am$)' | |
| 11 | 16 |
while read file; do echo $HGROOT/$file; done |
| 12 | 17 |
} |
| 13 | 18 |
|
| 14 | 19 |
function modified_files() {
|
| 15 | 20 |
hg status -a -m | |
| 16 | 21 |
cut -d ' ' -f 2 | grep -E '(\.(cc|h|dox)$|Makefile\.am$)' | |
| 17 | 22 |
while read file; do echo $HGROOT/$file; done |
| 18 | 23 |
} |
| 19 | 24 |
|
| 20 | 25 |
function changed_files() {
|
| 21 | 26 |
{
|
| ... | ... |
@@ -178,33 +183,33 @@ |
| 178 | 183 |
|
| 179 | 184 |
|
| 180 | 185 |
# checks |
| 181 | 186 |
|
| 182 | 187 |
function header_check() {
|
| 183 | 188 |
if echo $1 | grep -q -E 'Makefile\.am$' |
| 184 | 189 |
then |
| 185 | 190 |
return |
| 186 | 191 |
fi |
| 187 | 192 |
|
| 188 | 193 |
TMP_FILE=`mktemp` |
| 189 | 194 |
|
| 190 | 195 |
(echo "/* -*- mode: C++; indent-tabs-mode: nil; -*- |
| 191 | 196 |
* |
| 192 | 197 |
* This file is a part of LEMON, a generic C++ optimization library. |
| 193 | 198 |
* |
| 194 |
* Copyright (C) "$ |
|
| 199 |
* Copyright (C) 2003-"$(hg_year $1)" |
|
| 195 | 200 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
| 196 | 201 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
| 197 | 202 |
* |
| 198 | 203 |
* Permission to use, modify and distribute this software is granted |
| 199 | 204 |
* provided that this copyright notice appears in all copies. For |
| 200 | 205 |
* precise terms see the accompanying LICENSE file. |
| 201 | 206 |
* |
| 202 | 207 |
* This software is provided \"AS IS\" with no warranty of any kind, |
| 203 | 208 |
* express or implied, and with no claim as to its suitability for any |
| 204 | 209 |
* purpose. |
| 205 | 210 |
* |
| 206 | 211 |
*/ |
| 207 | 212 |
" |
| 208 | 213 |
awk 'BEGIN { pm=0; }
|
| 209 | 214 |
pm==3 { print }
|
| 210 | 215 |
/\/\* / && pm==0 { pm=1;}
|
0 comments (0 inline)