| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Copyright 2015 Google Inc. | 2 # Copyright 2015 Google Inc. |
| 3 # | 3 # |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Script for building Fiddle build bots. | 7 # Script for building Fiddle build bots. |
| 8 | 8 |
| 9 set -e | 9 set -e |
| 10 set -x | 10 set -x |
| 11 | 11 |
| 12 cd "$(dirname "$0")/../.." | 12 cd "$(dirname "$0")" |
| 13 fiddle_dir="$PWD" |
| 14 cd "../.." |
| 13 skia_dir="$PWD" | 15 skia_dir="$PWD" |
| 14 | 16 |
| 15 if ! command -v cmake > /dev/null 2>&1 ; then | 17 if ! command -v cmake > /dev/null 2>&1 ; then |
| 16 cores=32 | 18 cores=32 |
| 17 echo "Bootstrapping CMake" | 19 echo "Bootstrapping CMake" |
| 18 cmake_dir="${skia_dir}/third_party/externals/cmake" | 20 cmake_dir="${skia_dir}/third_party/externals/cmake" |
| 19 cd "$cmake_dir" | 21 cd "$cmake_dir" |
| 20 ./bootstrap --parallel=$cores | 22 ./bootstrap --parallel=$cores |
| 21 make -j $cores cmake | 23 make -j $cores cmake |
| 22 export PATH="${cmake_dir}/bin:${PATH}" | 24 export PATH="${cmake_dir}/bin:${PATH}" |
| 23 fi | 25 fi |
| 24 | 26 |
| 25 echo "Building Skia and Fiddle" | 27 echo "Building Skia and Fiddle" |
| 26 cd "${skia_dir}/experimental/fiddle" | 28 cd "$fiddle_dir" |
| 27 git clean -fxd . | 29 git clean -fxd . |
| 28 go build fiddler.go | 30 go build fiddler.go |
| 29 ./fiddler "$skia_dir" | 31 ./fiddler "$skia_dir" |
| 30 ./fiddler "$skia_dir" draw.cpp > /dev/null | 32 ./fiddler "$skia_dir" draw.cpp > /dev/null |
| 31 | 33 |
| 32 echo "cleaning up" | 34 echo "cleaning up" |
| 33 git clean -fxd . | 35 git clean -fxd . |
| OLD | NEW |