source: rtos_arduino/trunk/arduino_lib/libraries/ArduinoJson/scripts/create-size-graph.sh@ 209

Last change on this file since 209 was 209, checked in by ertl-honda, 8 years ago

BlueMix用のフィアルを追加

File size: 1.0 KB
Line 
1#!/bin/bash
2
3set -eu
4
5OUTPUT="$(pwd)/sizes.csv"
6
7echo "Tag;Date;Parser;Generator" > $OUTPUT
8
9cd $(dirname $(dirname $0))
10
11git tag | while read TAG
12do
13
14 git checkout -q tags/$TAG
15
16 DATE=$(git log -1 --date=short --pretty=format:%cd)
17 PARSER_SIZE=$(arduino --verify examples/JsonParserExample/JsonParserExample.ino 2>/dev/null | grep -e 'Sketch uses' | sed 's/.*uses \([0-9]*\).\([0-9]\+\).*/\1\2/')
18
19 if [ -e 'examples/JsonGeneratorExample/JsonGeneratorExample.ino' ]; then
20 GENERATOR_SIZE=$(arduino --verify examples/JsonGeneratorExample/JsonGeneratorExample.ino 2>/dev/null | grep -e 'Sketch uses' | sed 's/.*uses \([0-9]*\).\([0-9]\+\).*/\1\2/')
21 else
22 GENERATOR_SIZE=""
23 fi
24
25 echo $TAG
26 if [ ! -z "$PARSER_SIZE" ]
27 then
28 echo "JsonParserExample = $PARSER_SIZE bytes"
29 else
30 echo "JsonParserExample compilation failed."
31 fi
32
33 if [ ! -z "$GENERATOR_SIZE" ]
34 then
35 echo "JsonGeneratorExample = $GENERATOR_SIZE bytes"
36 else
37 echo "JsonGeneratorExample compilation failed."
38 fi
39
40 echo "$TAG;$DATE;$PARSER_SIZE;$GENERATOR_SIZE" >> $OUTPUT
41
42done
Note: See TracBrowser for help on using the repository browser.