summaryrefslogtreecommitdiff
path: root/update_icons.sh
blob: 1952604b36e3d08c8fa0d2eab40209ce3833a83a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin

if [[ -z `which iconoblast` ]]; then
    echo "Requires https://github.com/mapbox/iconoblast!"
    exit 1
fi

commit=`git rev-parse --short HEAD`
branch=`git rev-parse --abbrev-ref HEAD`
repo=`git remote show origin | grep 'Fetch URL' | sed -e 's/.*github\.com:mapbox\///' -e 's/\.git$//' -e 's/^mapbox-//'`

pwd=`pwd`
cd android/java/app/src/main/res
for folder in `find . -type d -name drawable-\* -maxdepth 1`
do
    cd ${folder}
    cp icon.png icon_burned.png
    iconoblast icon_burned.png $commit $branch $repo
    cd ..
done
cd ${pwd}