#!/bin/bash

# fiddle_wrapper takes the hash of the fiddle as its first argument, and additional arguments to 
# be passed to the build fiddle executable.  Then it:
#
# 1) runs fiddle_gyp to create the gyp file
# 2) runs fiddle_ninja to build the executable
# 3) runs fiddle_run to generate the output .png file.
#
# the output PNG file goes into the inout directory, which is shared between the chroot
# jail and the webserver environment.

[ -z "$SKIA_ROOT" ] && SKIA_ROOT="/skia_build/skia"

cd $SKIA_ROOT/experimental/webtry/scripts

./fiddle_gyp $1
./fiddle_ninja $1
./fiddle_run $@
