summaryrefslogtreecommitdiff
path: root/libs/androidfw/tests/data/sparse/gen_strings.sh
blob: 4ea5468c7df9fb62c7abd25f2981c5e484fef4c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

OUTPUT_default=res/values/strings.xml
OUTPUT_v26=res/values-v26/strings.xml

echo "<resources>" > $OUTPUT_default
echo "<resources>" > $OUTPUT_v26
for i in {0..999}
do
    echo "  <string name=\"foo_$i\">$i</string>" >> $OUTPUT_default
    if [ "$(($i % 3))" -eq "0" ]
    then
        echo "  <string name=\"foo_$i\">$(($i * 10))</string>" >> $OUTPUT_v26
    fi
done
echo "</resources>" >> $OUTPUT_default

echo "  <string name=\"only_v26\">only v26</string>" >> $OUTPUT_v26
echo "</resources>" >> $OUTPUT_v26