0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-19 19:42:17 +02:00
Anki-Android/tools/humanize-new-features.sh
2014-12-18 10:58:16 +09:00

24 lines
753 B
Bash
Executable File

#!/bin/bash
# Shows human-readable (not XML) changelog for English and for languages where it is not identical to English.
echo "English:"
grep "<item>" AnkiDroid/src/main/res/values/13-newfeatures.xml | sed -e "s/.*<item>/• /" -e "s/<.*//" -e "s/\\\\//"
LANGS=`ls AnkiDroid/src/main/res | grep "values-" | sed -e "s/values-//" | grep -v "v11"`
for LANG in $LANGS
do
DIFFERENT=`diff -b AnkiDroid/src/main/res/values-$LANG/13-newfeatures.xml AnkiDroid/src/main/res/values/13-newfeatures.xml | grep "<item>" | wc -l`
if [ $DIFFERENT -ne "0" ]
then
echo "$LANG:"
grep "<item>" AnkiDroid/src/main/res/values-$LANG/13-newfeatures.xml | sed -e "s/.*<item>/• /" -e "s/<.*//" -e "s/\\\\//"
else
echo "($LANG identical to English)"
fi
done