scripts/unify-sources.sh
changeset 498 a76f55d7d397
parent 208 4317d277ba21
child 628 586b65073025
equal deleted inserted replaced
0:8425204d375c 8:e35a9819f7bb
     1 #!/bin/bash
     1 #!/bin/bash
     2 
     2 
     3 YEAR=`date +2003-%Y`
     3 YEAR=`date +%Y`
     4 HGROOT=`hg root`
     4 HGROOT=`hg root`
       
     5 
       
     6 function hg_year() {
       
     7     if [ -n "$(hg st $1)" ]; then
       
     8         echo $YEAR
       
     9     else
       
    10         hg log -l 1 --template='{date|isodate}\n' $1 |
       
    11         cut -d '-' -f 1
       
    12     fi
       
    13 }
     5 
    14 
     6 function update_header() {
    15 function update_header() {
     7     TMP_FILE=`mktemp`
    16     TMP_FILE=`mktemp`
     8     FILE_NAME=$1
    17     FILE_NAME=$1
     9 
    18 
    10     (echo "/* -*- mode: C++; indent-tabs-mode: nil; -*-
    19     (echo "/* -*- mode: C++; indent-tabs-mode: nil; -*-
    11  *
    20  *
    12  * This file is a part of LEMON, a generic C++ optimization library.
    21  * This file is a part of LEMON, a generic C++ optimization library.
    13  *
    22  *
    14  * Copyright (C) "$YEAR"
    23  * Copyright (C) 2003-"$(hg_year $1)"
    15  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    24  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    16  * (Egervary Research Group on Combinatorial Optimization, EGRES).
    25  * (Egervary Research Group on Combinatorial Optimization, EGRES).
    17  *
    26  *
    18  * Permission to use, modify and distribute this software is granted
    27  * Permission to use, modify and distribute this software is granted
    19  * provided that this copyright notice appears in all copies. For
    28  * provided that this copyright notice appears in all copies. For