| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # This script builds Skia for ChromeOS by mounting the Skia checkout inside a | 3 # This script builds Skia for ChromeOS by mounting the Skia checkout inside a |
| 4 # chroot contained within an existing ChromeOS checkout, entering the chroot, | 4 # chroot contained within an existing ChromeOS checkout, entering the chroot, |
| 5 # and running the build_skia_in_chroot script. | 5 # and running the build_skia_in_chroot script. |
| 6 | 6 |
| 7 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 7 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| 8 | 8 |
| 9 if [ $(uname) != "Linux" ]; then | 9 if [ $(uname) != "Linux" ]; then |
| 10 echo "ERROR: Can only build for ChromeOS on Linux." | 10 echo "ERROR: Can only build for ChromeOS on Linux." |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 # Put a fake .gclient file in the toolchain directory so that the cros tool | 62 # Put a fake .gclient file in the toolchain directory so that the cros tool |
| 63 # thinks we're in a Chrome checkout. | 63 # thinks we're in a Chrome checkout. |
| 64 echo "Delete me!" > "${CHROMEOS_CHROOT}/.gclient" | 64 echo "Delete me!" > "${CHROMEOS_CHROOT}/.gclient" |
| 65 | 65 |
| 66 # Where the Skia code will pretend to live inside the chroot. | 66 # Where the Skia code will pretend to live inside the chroot. |
| 67 SKIA_TOP_DIR="${SCRIPT_DIR}/../../.." | 67 SKIA_TOP_DIR="${SCRIPT_DIR}/../../.." |
| 68 | 68 |
| 69 pushd ${CHROMEOS_CHROOT} | 69 pushd ${CHROMEOS_CHROOT} |
| 70 cros chrome-sdk --nogoma --board ${deviceID} --debug -- /bin/sh -c "cd ${SKIA_TO
P_DIR}; platform_tools/chromeos/bin/build_skia_in_chroot ${makeVars}" | 70 cros chrome-sdk --nogoma --board ${deviceID} --debug -- /bin/sh -c "cd ${SKIA_TO
P_DIR}; platform_tools/chromeos/bin/build_skia_in_chroot ${makeVars}" |
| 71 returnVal=$? | |
| 72 popd > /dev/null | 71 popd > /dev/null |
| 73 | 72 |
| 74 # Clean up | 73 # Clean up |
| 75 rm ${CHROMEOS_CHROOT}/.gclient | 74 rm ${CHROMEOS_CHROOT}/.gclient |
| 76 | 75 |
| 77 if [ "${returnVal}" != "0" ] | 76 if [ -f .cros_build_successful ]; then |
| 78 then | 77 rm -rf .cros_build_successful |
| 79 exit 1; | 78 exit 0 |
| 80 fi | 79 fi |
| 80 |
| 81 exit 1 |
| OLD | NEW |