3 ## This file is part of the aMule Project
5 ## Copyright (c) 2011 Dévai Tamás ( gonosztopi@amule.org )
6 ## Copyright (c) 2011 aMule Team ( admin@amule.org / http://www.amule.org )
8 ## This program is free software; you can redistribute it and/or
9 ## modify it under the terms of the GNU General Public License
10 ## as published by the Free Software Foundation; either
11 ## version 2 of the License, or (at your option) any later version.
13 ## This program is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU General Public License for more details.
18 ## You should have received a copy of the GNU General Public License
19 ## along with this program; if not, write to the Free Software
20 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 # year_bumper [oldyear [newyear]]
25 # oldyear defaults to the year found in configure.in
26 # newyear defaults to the current year
28 if [ ! -f .
/configure.
in ]; then
29 echo "This script must be run from the source root directory!"
36 oldyear
=`sed -e 's/# Copyright (c) 2003-\([0-9]\{4\}\).*/\1/;t;d' ./configure.in`
45 echo "Bumping from ${oldyear} to ${newyear}..."
47 if [ "$newyear" = "$oldyear" ]; then
61 if file "$f" |
grep -q text
; then
62 if grep -q "$oldyear" "$f" ; then
64 sed -i -e "/Copyright/{s/-${oldyear}/-${newyear}/g;s/${oldyear}/${oldyear}-${newyear}/g;}" "$f"