diff --git a/appinfo.json.tmpl b/appinfo.json.tmpl index cc9138e..3e492b0 100644 --- a/appinfo.json.tmpl +++ b/appinfo.json.tmpl @@ -4,29 +4,29 @@ "" ], "companyName": "dartcatcher@gmail.com", - "longName": "Helvetica", + "longName": "%FONT %COLOR", "projectType": "native", "resources": { "media": [ { "characterRegex": "[0-9A-Za-z\u00e9\u00f4 ]", - "file": "fonts/HelveticaNeue-Regular.ttf", - "name": "HELVETICA_R_28", + "file": "fonts/%FONT-Regular.ttf", + "name": "FONT_R_28", "type": "font" }, { "characterRegex": "[0-9:]", - "file": "fonts/HelveticaNeue-Bold.ttf", - "name": "HELVETICA_B_48", + "file": "fonts/%FONT-Bold.ttf", + "name": "FONT_B_48", "type": "font" } ] }, "sdkVersion": "3", - "shortName": "Helvetica", - "uuid": "534e5853-7be7-447e-a67d-b236ac9f4f51", + "shortName": "%FONT %COLOR", + "uuid": "%UUID", "versionCode": 1, - "versionLabel": "1.0", + "versionLabel": "1.1", "watchapp": { "watchface": true }, diff --git a/build.sh b/build.sh index d01197d..e3fb2f5 100755 --- a/build.sh +++ b/build.sh @@ -1,12 +1,35 @@ #! /bin/sh -e +echo PATH=$PATH:$HOME/pebble-dev/PebbleSDK-3.1/bin +cd $(dirname $0) + build () { - echo $1 - [ $1 = Black ] && uuid=1 || uuid=0 - sed "s/%COLOR/$1/;s/%UUID/$uuid/" appinfo.json.tmpl > appinfo.json - pebble build - cp build/HelveticaFace.pbw HelveticaFace-$1.pbw + font=$1 + color=$2 + uuid=$3 + name=${font}Face-$color + sed "s/%COLOR/$color/;s/%FONT/$font/;s/%UUID/$uuid/" appinfo.json.tmpl > appinfo.json + pebble build + cp build/FontFace.pbw $name.pbw + echo $name.pbw } -build Black -build White +if [ -n "$1" ]; then + pbw=$(build $1 White 879db5ec-8bfc-41ca-8988-96da8ae23d14) + pebble install $pbw +else + while read font color uuid; do + build $font $color $uuid + done <