CfgUSBLoader/Languages/add_bom.sh
2015-01-17 10:11:08 +00:00

9 lines
183 B
Bash

#!/bin/sh
if [ -n "$1" ]; then
perl -e '@file=<>;print "\xEF\xBB\xBF";print(@file);' < "$1" > "$1".tmp
mv "$1".tmp "$1"
else
perl -e '@file=<>;print "\xEF\xBB\xBF";print(@file);'
fi