mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Fix up shell scripts
This brings these two scripts in line with the style guidelines.
This commit is contained in:
parent
7da28b7ca6
commit
bf92401283
2 changed files with 22 additions and 4 deletions
|
@ -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
|
if [ $# -eq 0 ]; then
|
||||||
echo "Usage: $0 /path/to/gecko/objdir [other-regen.py-flags]"
|
echo "Usage: $0 /path/to/gecko/objdir [other-regen.py-flags]"
|
||||||
|
@ -13,7 +21,8 @@ fi
|
||||||
|
|
||||||
# Check for /usr/include
|
# Check for /usr/include
|
||||||
if [ ! -d /usr/include ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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.
|
# Run in the tools directory.
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
|
@ -12,7 +20,8 @@ fi
|
||||||
|
|
||||||
# Make sure we have llvm38.
|
# Make sure we have llvm38.
|
||||||
if [ ! -x "$(command -v clang-3.8)" ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue