Skip to content

Commit

Permalink
Run sed in binary mode so we don't have to worry about fixing line en…
Browse files Browse the repository at this point in the history
…dings
  • Loading branch information
slouken committed Jan 2, 2017
1 parent 9e6d729 commit 0badbdd
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions build-scripts/update-copyright.sh
Expand Up @@ -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

0 comments on commit 0badbdd

Please sign in to comment.