Commit 0badbddef92b21d3b924fe18a31bb1639d167f45

Sam Lantinga 2017-01-01T18:47:29

Run sed in binary mode so we don't have to worry about fixing line endings

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/build-scripts/update-copyright.sh b/build-scripts/update-copyright.sh
index 84437ce..5955b09 100755
--- a/build-scripts/update-copyright.sh
+++ b/build-scripts/update-copyright.sh
@@ -4,13 +4,5 @@ find . -type f -exec grep -Il "Copyright" {} \;     \
 | grep -v \.hg                             \
 | while read file;                            \
 do \
-  LC_ALL=C sed -ie "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
-  rm "${file}e"; \
-done
-
-for file in COPYING.txt VisualC-WinRT/SDL2-WinRT.nuspec VisualC-WinRT/SDL2main-WinRT-NonXAML.nuspec src/main/windows/version.rc visualtest/COPYING.txt
-do if [ -f "$file" ]; then
-     sed 's/$'"/`echo \\\r`/" $file > $file.new
-     mv $file.new $file
-   fi
+  LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
 done