Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: build/update-linux-sandbox.sh

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/uiautomator_test.gypi ('k') | build/util/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/sh
2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 BUILDTYPE="${BUILDTYPE:-Debug}"
8 CHROME_SRC_DIR="${CHROME_SRC_DIR:-$(dirname -- $(readlink -fn -- "$0"))/..}"
9 CHROME_OUT_DIR="${CHROME_SRC_DIR}/${CHROMIUM_OUT_DIR:-out}/${BUILDTYPE}"
10 CHROME_SANDBOX_BUILD_PATH="${CHROME_OUT_DIR}/chrome_sandbox"
11 CHROME_SANDBOX_INST_PATH="/usr/local/sbin/chrome-devel-sandbox"
12 CHROME_SANDBOX_INST_DIR=$(dirname -- "$CHROME_SANDBOX_INST_PATH")
13
14 TARGET_DIR_TYPE=$(stat -f -c %t -- "${CHROME_SANDBOX_INST_DIR}" 2>/dev/null)
15 if [ $? -ne 0 ]; then
16 echo "Could not get status of ${CHROME_SANDBOX_INST_DIR}"
17 exit 1
18 fi
19
20 # Make sure the path is not on NFS.
21 if [ "${TARGET_DIR_TYPE}" = "6969" ]; then
22 echo "Please make sure ${CHROME_SANDBOX_INST_PATH} is not on NFS!"
23 exit 1
24 fi
25
26 installsandbox() {
27 echo "(using sudo so you may be asked for your password)"
28 sudo -- cp "${CHROME_SANDBOX_BUILD_PATH}" \
29 "${CHROME_SANDBOX_INST_PATH}" &&
30 sudo -- chown root:root "${CHROME_SANDBOX_INST_PATH}" &&
31 sudo -- chmod 4755 "${CHROME_SANDBOX_INST_PATH}"
32 return $?
33 }
34
35 if [ ! -d "${CHROME_OUT_DIR}" ]; then
36 echo -n "${CHROME_OUT_DIR} does not exist. Use \"BUILDTYPE=Release ${0}\" "
37 echo "If you are building in Release mode"
38 exit 1
39 fi
40
41 if [ ! -f "${CHROME_SANDBOX_BUILD_PATH}" ]; then
42 echo -n "Could not find ${CHROME_SANDBOX_BUILD_PATH}, "
43 echo "please make sure you build the chrome_sandbox target"
44 exit 1
45 fi
46
47 if [ ! -f "${CHROME_SANDBOX_INST_PATH}" ]; then
48 echo -n "Could not find ${CHROME_SANDBOX_INST_PATH}, "
49 echo "installing it now."
50 installsandbox
51 fi
52
53 if [ ! -f "${CHROME_SANDBOX_INST_PATH}" ]; then
54 echo "Failed to install ${CHROME_SANDBOX_INST_PATH}"
55 exit 1
56 fi
57
58 CURRENT_API=$("${CHROME_SANDBOX_BUILD_PATH}" --get-api)
59 INSTALLED_API=$("${CHROME_SANDBOX_INST_PATH}" --get-api)
60
61 if [ "${CURRENT_API}" != "${INSTALLED_API}" ]; then
62 echo "Your installed setuid sandbox is too old, installing it now."
63 if ! installsandbox; then
64 echo "Failed to install ${CHROME_SANDBOX_INST_PATH}"
65 exit 1
66 fi
67 else
68 echo "Your setuid sandbox is up to date"
69 if [ "${CHROME_DEVEL_SANDBOX}" != "${CHROME_SANDBOX_INST_PATH}" ]; then
70 echo -n "Make sure you have \"export "
71 echo -n "CHROME_DEVEL_SANDBOX=${CHROME_SANDBOX_INST_PATH}\" "
72 echo "somewhere in your .bashrc"
73 echo "This variable is currently: ${CHROME_DEVEL_SANDBOX:-empty}"
74 fi
75 fi
OLDNEW
« no previous file with comments | « build/uiautomator_test.gypi ('k') | build/util/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698