ppsspp/Tools/langtool/unused-euristic.sh

29 lines
822 B
Bash
Raw Normal View History

2022-05-12 06:42:41 +00:00
#!/bin/bash
langfile='../../assets/lang/en_US.ini'
2022-05-14 22:57:56 +00:00
folders=('../../UI/' '../../Core/' '../../Common/' '../../GPU/' '../../Windows/' '../../assets/shaders' '../../assets/themes')
2022-05-12 06:42:41 +00:00
# reading each line
while read line; do
# skip empty line, section and comment
if [[ ! -z "$line" && ${line::1} != "[" && ${line::1} != "#" ]]; then
# get everything before the = sign
value=${line/ =*/}
found=0
for folder in ${folders[@]}; do
# use recursive grep on the folder
grep -r "$value" $folder > /dev/null
# check return value
ret=$?
if [ $ret -eq 0 ]; then
found=1
fi
done
# print if not found
if [ $found -eq 0 ]; then
echo $value
fi
fi
done < $langfile