build: Improve BOM-adding on InnoSetup files.

My previous command was also adding a linefeed just after the BOM. While
I'm not sure it would really break anything for processing these, it's
anyway much more correct to only add the 3 BOM bytes. So here is the
improved command.
This commit is contained in:
Jehan 2022-01-10 21:27:12 +01:00
parent 5872d8dd45
commit 9ba44aab2a
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ add_bom ()
file "$lang.isl" |grep "with BOM" 2>&1 > /dev/null
has_bom="$?"
if [ $has_bom -ne 0 ]; then
sed -i "1 i \\\xEF\xBB\xBF" "$lang.isl"
sed -i "1s/^/\xEF\xBB\xBF/" "$lang.isl"
fi
}