6
echo "FAIL Called without base directory"
9
if ! test -d "$1"; then
10
echo "$1 is not a directory"
18
# handle whitespace and some other special characters in dir/file names
19
while IFS= read -rd $'\0' file; do
21
echo "Testing $files: $file"
22
echo `grep '^potfilename=' "$file"`
23
count=`grep -c '^potfilename=' "$file"`
24
if [[ $count != 1 ]]; then
25
errors=$((errors + 1))
26
echo "FAIL Did not find 'potfilename=' correct number of times"
31
echo "----------------------------------------------------------"
32
done < <(find "$1" -name 'Messages.sh' -type f -print0 )
35
echo "Found and tested $files messagefiles, detected $errors errors"
37
echo "----------------------------------------------------------"