1#!/bin/bash 2 3# This script builds Skia inside of a ChromeOS chroot. It is intended to be run 4# either while inside the chroot or indirectly by running chromeos_make which 5# enters the chroot and runs this script. 6 7makeVars="" 8deviceID="" 9 10while (( "$#" )); do 11 12 if [[ $(echo "$1" | grep "^-d$") != "" ]]; 13 then 14 deviceID="$2" 15 shift 16 else 17 makeVars="$makeVars $1" 18 fi 19 20shift 21done 22 23SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 24 25source $SCRIPT_DIR/chromeos_setup.sh 26 27setup_device $deviceID 28returnVal=$? 29if [ $returnVal != 0 ] 30then 31 exit 1; 32fi 33 34python gyp_skia 35make ${makeVars} 36returnVal=$? 37if [ $returnVal != 0 ] 38then 39 exit 1; 40fi 41 42echo > .cros_build_successful