File: inc_year

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (29 lines) | stat: -rwxr-xr-x 1,127 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
##############################################################################
# Name:       misc/scripts/inc_year
# Purpose:    increments the year in various copyright notices
# Created:    2019-04-21
# Copyright:  (c) 2019 Vadim Zeitlin <vadim@wxwidgets.org>
# Licence:    wxWindows licence
##############################################################################

. `dirname $0`/run_sed_common.sh

new_year=`date +%Y`
old_year=`expr $new_year - 1`

echo "Updating dates to use $new_year instead of $old_year:"

# Update copyright to extend to the new year.
for f in docs/doxygen/mainpages/copyright.h docs/doxygen/regen.sh \
         interface/wx/aboutdlg.h interface/wx/generic/aboutdlgg.h \
         samples/dialogs/dialogs.cpp \
         src/common/utilscmn.cpp src/msw/version.rc \
         ; do
    run_sed $f "s/1992-$old_year/1992-$new_year/"
done

# And Mac files are much newer than that.
run_sed CMakeLists.txt "s/2002-$old_year/2002-$new_year/"
run_sed build/bakefiles/mac_bundles.bkl "s/2002-$old_year/2002-$new_year/"
run_sed samples/minimal/Info_cocoa.plist "s/2005-$old_year/2005-$new_year/"