Merge pull request #705 from GPCsolutions/develop-noutf8bomscripts
Added UTF-8 BOM detection and removal maintenance scripts
This commit is contained in:
commit
519e5dfd48
10
dev/findutf8bom.sh
Executable file
10
dev/findutf8bom.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Checks if files contains UTF-8 BOM
|
||||
# in dolibarr source tree excluding
|
||||
# git repository, custom modules and incuded libraries
|
||||
#
|
||||
# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
grep -rlI \
|
||||
--exclude-dir='.git' --exclude-dir='includes' --exclude-dir='custom' \
|
||||
$'\xEF\xBB\xBF' .
|
||||
10
dev/findutf8bomincludes.sh
Executable file
10
dev/findutf8bomincludes.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Checks if files contains UTF-8 BOM
|
||||
# in dolibarr includes tree excluding
|
||||
# git repository
|
||||
#
|
||||
# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
grep -rlI \
|
||||
--exclude-dir='.git' \
|
||||
$'\xEF\xBB\xBF' htdocs/includes
|
||||
10
dev/removeutf8bom.sh
Executable file
10
dev/removeutf8bom.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Removes UTF-8 BOM from a file list on STDIN
|
||||
# Use by piping the output of a findutf8bom script
|
||||
#
|
||||
# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
while read f; do
|
||||
echo "Fixing $f"
|
||||
sed -i '1s/^\xEF\xBB\xBF//' $f
|
||||
done
|
||||
Loading…
Reference in New Issue
Block a user