aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/chromeos/bin/build_skia_in_chroot
blob: 86f6d33841654736c18ba5aad1c3becda47927ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash

# This script builds Skia inside of a ChromeOS chroot. It is intended to be run
# either while inside the chroot or indirectly by running chromeos_make which
# enters the chroot and runs this script.

makeVars=""
deviceID=""

while (( "$#" )); do

  if [[ $(echo "$1" | grep "^-d$") != "" ]];
  then 
    deviceID="$2"
    shift
  else
    makeVars="$makeVars $1"
  fi

shift
done

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

source $SCRIPT_DIR/chromeos_setup.sh

setup_device $deviceID
returnVal=$?
if [ $returnVal != 0 ]
then
  exit 1;
fi

python gyp_skia
make ${makeVars}
returnVal=$?
if [ $returnVal != 0 ]
then
  exit 1;
fi

echo > .cros_build_successful