File: update_copyright_year

package info (click to toggle)
hkl 5.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 40,776 kB
  • sloc: ansic: 56,912; haskell: 5,879; python: 4,591; makefile: 1,137; cpp: 976; sh: 215; xml: 168; perl: 133; lisp: 80
file content (8 lines) | stat: -rwxr-xr-x 263 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
#!/bin/bash

CURRENT_YEAR=`date +%Y`
let LAST_YEAR=CURRENT_YEAR-1
MSG="upgrading copyright year from $LAST_YEAR to $CURRENT_YEAR"
echo $MSG
rgrep -w -l -I "Copyright .*-$LAST_YEAR" .. | xargs sed -i "s,-$LAST_YEAR,-$CURRENT_YEAR,g"
echo $MSG > ../.git/GITGUI_BCK