Home | History | Annotate | Download | only in bin
      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 
     11 try() {
     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 
     21 try command -v gclient > /dev/null || exit
     22 cd "$(dirname "$0")/../../.."
     23 
     24 try gclient config --unmanaged --name . \
     25     'https://skia.googlesource.com/skia.git' || exit
     26 
     27 echo 'target_os = ["barelinux"]' >> ./.gclient
     28 
     29 try gclient sync --jobs=1 || exit
     30