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

Unified Diff: platform_tools/barelinux/bin/barelinux_make

Issue 222803002: arm64_make script changes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: AnotherPatchSet Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « platform_tools/barelinux/bin/arm64_make ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/barelinux/bin/barelinux_make
diff --git a/platform_tools/barelinux/bin/barelinux_make b/platform_tools/barelinux/bin/barelinux_make
index 4f2400f8ca08e90ada1cb5a4b58e5057df53d79a..3db3b99fc486f105a5267f13d247f861dfa496f7 100755
--- a/platform_tools/barelinux/bin/barelinux_make
+++ b/platform_tools/barelinux/bin/barelinux_make
@@ -5,6 +5,13 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+set -e # When any command fails, the shell will immediately exit.
+
+if echo $- | grep -q 'x'; then
+ # Debug mode
+ trap 'echo exit status = $?' EXIT
+fi
+
usage() {
cat >&2 <<EOF
barelinux_make - this script builds a version of skia that does not
@@ -52,27 +59,17 @@ GYP_DEFINES="${GYP_DEFINES} $*"
# If you move this script, this must be changed.
SKIA_SRC_DIR="$(cd "$(dirname "$0")/../../.."; pwd)"
-try() {
- # exit shell script on nonzero return code
- "$@"
- local ret=$?
- if [ $ret != 0 ] ; then
- echo "'$@' failed and returned ${ret}." >&2
- return $ret
- fi
-}
-is_set() {
- test "$1" && test "$(eval echo \${$1})";
-}
-
# Set a reasonable default.
-is_set SKIA_OUT || export SKIA_OUT="${SKIA_SRC_DIR}/out/barelinux"
+if ! test "$SKIA_OUT"; then
mtklein 2014/04/02 20:05:32 export SKIA_OUT=${SKIA_OUT-"${SKIA_SRC_DIR}/out/ba
hal.canary 2014/04/02 20:07:20 Done.
+ export SKIA_OUT="${SKIA_SRC_DIR}/out/barelinux"
+fi
# Assume ninja is in your path
mtklein 2014/04/02 20:05:32 Assume -> check? Or given that everything going t
hal.canary 2014/04/02 20:07:20 It doesn't cost much to test this early. I'm goin
-try command -v ninja > /dev/null || exit
+command -v ninja > /dev/null
+
+test -x "${SKIA_SRC_DIR}/gyp_skia"
-try test -x "${SKIA_SRC_DIR}/gyp_skia" || exit
-try mkdir -p "$SKIA_OUT" || exit
+mkdir -p "$SKIA_OUT"
export GYP_GENERATORS="ninja"
export GYP_GENERATOR_FLAGS=""
@@ -87,9 +84,9 @@ export GYP_DEFINES="${GYP_DEFINES} \
skia_skip_gui=1 \
"
-try "${SKIA_SRC_DIR}/gyp_skia" || exit
+"${SKIA_SRC_DIR}/gyp_skia"
-try test -d "${SKIA_OUT}/${BUILD_TYPE}" || exit
+test -d "${SKIA_OUT}/${BUILD_TYPE}"
-try ninja -C "${SKIA_OUT}/${BUILD_TYPE}" || exit
+ninja -C "${SKIA_OUT}/${BUILD_TYPE}"
« no previous file with comments | « platform_tools/barelinux/bin/arm64_make ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698