build-scripts/update-copyright.sh
author Sam Lantinga
Sun, 01 Jan 2017 18:36:35 -0800
changeset 10738 c88f08b5a807
parent 10736 beca1404c586
child 10739 1887bc9a89e2
permissions -rwxr-xr-x
Fixed typo in copyright update script
slouken@9618
     1
#!/bin/sh
slouken@9618
     2
slouken@9618
     3
find . -type f -exec grep -Il "Copyright" {} \;     \
slouken@9618
     4
| grep -v \.hg                             \
slouken@10738
     5
| while read file;                            \
slouken@9618
     6
do \
slouken@10736
     7
  LC_ALL=C sed -ie "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
slouken@10736
     8
  rm "${file}e"; \
slouken@9618
     9
done
slouken@10736
    10
slouken@10736
    11
for file in COPYING.txt VisualC-WinRT/SDL2-WinRT.nuspec VisualC-WinRT/SDL2main-WinRT-NonXAML.nuspec src/main/windows/version.rc visualtest/COPYING.txt
slouken@10736
    12
do if [ -f "$file" ]; then
slouken@10736
    13
     sed 's/$'"/`echo \\\r`/" $file > $file.new
slouken@10736
    14
     mv $file.new $file
slouken@10736
    15
   fi
slouken@10736
    16
done