aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-07 16:24:52 -0700
committerGitHub <noreply@github.com>2016-07-07 16:24:52 -0700
commit1f5c26a320af170a44f43dee4dcb076a6c5593e2 (patch)
treeae1e4ff4a57483db8da9e8f585c6d68acf12d056
parentd0ab03bb294b91e47ca929464ab71e7c42ff2e9a (diff)
parentbf924012835fefb3f979191556e317f88dbf41f0 (diff)
downloadservo-1f5c26a320af170a44f43dee4dcb076a6c5593e2.tar.gz
servo-1f5c26a320af170a44f43dee4dcb076a6c5593e2.zip
Auto merge of #12299 - jimberlage:fixup-scripts, r=emilio
Fix up shell scripts <!-- Please describe your changes on the following line: --> This brings these two scripts in line with the style guidelines. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because it's a small change to bring some shell scripts in line with the style guide <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12299) <!-- Reviewable:end -->
-rwxr-xr-xports/geckolib/gecko_bindings/tools/regen.sh13
-rwxr-xr-xports/geckolib/gecko_bindings/tools/setup_bindgen.sh13
2 files changed, 22 insertions, 4 deletions
diff --git a/ports/geckolib/gecko_bindings/tools/regen.sh b/ports/geckolib/gecko_bindings/tools/regen.sh
index ffdf99688f1..2d02bebdb34 100755
--- a/ports/geckolib/gecko_bindings/tools/regen.sh
+++ b/ports/geckolib/gecko_bindings/tools/regen.sh
@@ -1,4 +1,12 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+set -o errexit
+set -o nounset
+set -o pipefail
if [ $# -eq 0 ]; then
echo "Usage: $0 /path/to/gecko/objdir [other-regen.py-flags]"
@@ -13,7 +21,8 @@ fi
# Check for /usr/include
if [ ! -d /usr/include ]; then
- echo "/usr/include doesn't exist. Mac users may need to run xcode-select --install."
+ echo "/usr/include doesn't exist." \
+ "Mac users may need to run xcode-select --install."
exit 1
fi
diff --git a/ports/geckolib/gecko_bindings/tools/setup_bindgen.sh b/ports/geckolib/gecko_bindings/tools/setup_bindgen.sh
index 768fb53794d..d42bfc9adb4 100755
--- a/ports/geckolib/gecko_bindings/tools/setup_bindgen.sh
+++ b/ports/geckolib/gecko_bindings/tools/setup_bindgen.sh
@@ -1,4 +1,12 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+set -o errexit
+set -o nounset
+set -o pipefail
# Run in the tools directory.
cd "$(dirname $0)"
@@ -12,7 +20,8 @@ fi
# Make sure we have llvm38.
if [ ! -x "$(command -v clang-3.8)" ]; then
- echo "llmv38 must be installed. Mac users should |brew install llvm38|, Linux varies by distro."
+ echo "llmv38 must be installed." \
+ "Mac users should |brew install llvm38|, Linux varies by distro."
exit 1
fi