CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Tools/langtool/unused-euristic.sh
Views: 1401
1
#!/bin/bash
2
3
langfile='../../assets/lang/en_US.ini'
4
folders=('../../UI/' '../../Core/' '../../Common/' '../../GPU/' '../../Windows/' '../../assets/shaders' '../../assets/themes')
5
6
# reading each line
7
while read line; do
8
# skip empty line, section and comment
9
if [[ ! -z "$line" && ${line::1} != "[" && ${line::1} != "#" ]]; then
10
# get everything before the = sign
11
value=${line/ =*/}
12
13
found=0
14
for folder in ${folders[@]}; do
15
# use recursive grep on the folder
16
grep -r "$value" $folder > /dev/null
17
# check return value
18
ret=$?
19
if [ $ret -eq 0 ]; then
20
found=1
21
fi
22
done
23
24
# print if not found
25
if [ $found -eq 0 ]; then
26
echo $value
27
fi
28
fi
29
done < $langfile
30