generateAndroidIcon.sh 434 Bytes
#!/usr/bin/env bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

for density in l-36 m-48 h-72 xh-96 xxh-144 xxxh-192
do
    drawdir="${DIR}/app/src/main/res/drawable-$(echo "$density" | cut -d '-' -f 1)dpi"
    mkdir -p "$drawdir"
    outfile="${drawdir}/etunicorn.png"
    size="$(echo "$density" | cut -d '-' -f 2)"
    inkscape -z -e "$outfile" -w "$size" -h "$size" "${DIR}/logo.svg"
    optipng -o9 "$outfile"
done