Bug 15006: [QA Follow-up] Satisfy qa tools with one tab less
[koha.git] / xt / find-nonutf8
1 #!/bin/sh
2 #
3 # Find Koha source files that are not in UTF-8. Non-textual files are ignored.
4 # This script requires the isutf8 program from Joey Hess's moreutils package.
5 # See <http://kitenet.net/~joey/code/moreutils/> for info.
6
7 # Copyright 2010 Catalyst IT Ltd
8 #
9 # This file is part of Koha.
10 #
11 # Koha is free software; you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 3 of the License, or
14 # (at your option) any later version.
15 #
16 # Koha is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with Koha; if not, see <http://www.gnu.org/licenses>.
23
24 set -e
25
26 git ls-files |
27 grep -Ev '\.(gif|jpg|png|pdf|ogg|psd|swf|odt|zip|ico|DS_Store|chr|dat)$' |
28 grep -v /js/tinymce/ |
29 while read filename
30 do
31     if ! isutf8 -q "$filename" 
32     then
33         echo "$filename"
34     fi
35 done
36