1#!/bin/sh 2 3# Copyright 2014 Google Inc. 4# 5# Use of this source code is governed by a BSD-style license that can be 6# found in the LICENSE file. 7 8# download_deps - download Skia's dependencies for a bare Linux system 9# (the normal dependecies plus giflib, libpng, and zlib.) 10 11try() { 12 # print an error on nonzero return code 13 "$@" 14 local ret=$? 15 if [ $ret != 0 ] ; then 16 echo "'$@' failed and returned ${ret}." >&2 17 return $ret 18 fi 19} 20 21try command -v gclient > /dev/null || exit 22cd "$(dirname "$0")/../../.." 23 24try gclient config --unmanaged --name . \ 25 'https://skia.googlesource.com/skia.git' || exit 26 27echo 'target_os = ["barelinux"]' >> ./.gclient 28 29try gclient sync --jobs=1 || exit 30