aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/barelinux/bin/download_deps
blob: 06769613b308946665a1df2be9186334fd924ecd (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
#!/bin/sh

# Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# download_deps - download Skia's dependencies for a bare Linux system
# (the normal dependecies plus giflib, libpng, and zlib.)

try() {
    # print an error on nonzero return code
    "$@"
    local ret=$?
    if [ $ret != 0 ] ; then
        echo "'$@' failed and returned ${ret}." >&2
        return $ret
    fi
}

try command -v gclient > /dev/null || exit
cd "$(dirname "$0")/../../.."

try gclient config --unmanaged --name . \
    'https://skia.googlesource.com/skia.git' || exit

echo 'target_os = ["barelinux"]' >> ./.gclient

try gclient sync --jobs=1 || exit