File indexing completed on 2024-05-12 04:17:32

0001 #!/bin/bash
0002 
0003 # SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier, <caulier dot gilles at gmail dot com>
0004 #
0005 # SPDX-License-Identifier: BSD-3-Clause
0006 #
0007 # Copy this script on root folder where are source code
0008 
0009 for f in `find \( -name '*.cpp' -o -name '*.h' \)` ; do
0010 
0011     if test -f $f ; then
0012 
0013         CHARSET="$( file -bi "$f"|awk -F "=" '{print $2}')"
0014 
0015         if [ "$CHARSET" != us-ascii ]; then
0016 
0017             echo -e "$f => $CHARSET"
0018 
0019         fi
0020 
0021     else
0022 
0023         echo -e "\nSkipping $f - it's a regular file";
0024 
0025     fi
0026 
0027 done