add a script to check if strings are still in use

This commit is contained in:
B. Petersen 2020-01-17 15:11:25 +01:00
parent adaf3519d7
commit d3e9068708
No known key found for this signature in database
GPG key ID: 3B88E92DEA8E9AFC

17
tools/grep-string.sh Executable file
View file

@ -0,0 +1,17 @@
TEXT=$1
if [ -z "$TEXT" ]; then
echo "this script searches for the string key given as the first parameter."
echo "search is done in this repo and in ../deltachat-ios and in ../deltachat-desktop."
echo "usage: ./tools/grep-string.sh <STRING-KEY>"
exit
fi
echo "==================== ANDROID USAGE ===================="
grep --exclude={*.apk,*.a,*.o,*.so,strings.xml} --exclude-dir={.git,.gradle,jni,obj,release,.idea,build,jni} -ri $TEXT .
echo "==================== IOS USAGE ===================="
grep --exclude=*.strings --exclude-dir={.git,libraries,Pods,deltachat-ios.xcodeproj,deltachat-ios.xcworkspace} -ri $TEXT ../deltachat-ios/
echo "==================== DESKTOP USAGE ===================="
grep --exclude-dir={.git,_locales} -ri $TEXT ../deltachat-desktop/