mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add set -eu to all shell scripts
These flags ensure that any errors cause the script to exit (instead of
just carrying on) (`-e`) and that any unrecognised substitution variables
cause an error instead of silently resolving to an empty string (`-u`).
Issues like Issue: google/ExoPlayer#10791 should be more quickly resolved with
`set -e` because the script will clearly fail with an error like
`make: command not found` which would give the user a clear pointer
towards the cause of the problem.
#minor-release
PiperOrigin-RevId: 490001419
(cherry picked from commit 45b8fb0ae1)
This commit is contained in:
parent
f4f801a809
commit
3476ca9296
3 changed files with 3 additions and 2 deletions
|
|
@ -14,6 +14,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
set -eu
|
||||||
|
|
||||||
FFMPEG_MODULE_PATH=$1
|
FFMPEG_MODULE_PATH=$1
|
||||||
NDK_PATH=$2
|
NDK_PATH=$2
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e
|
set -eu
|
||||||
ASM_CONVERTER="./libopus/celt/arm/arm2gnu.pl"
|
ASM_CONVERTER="./libopus/celt/arm/arm2gnu.pl"
|
||||||
|
|
||||||
if [[ ! -x "${ASM_CONVERTER}" ]]; then
|
if [[ ! -x "${ASM_CONVERTER}" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
# a bash script that generates the necessary config files for libvpx android ndk
|
# a bash script that generates the necessary config files for libvpx android ndk
|
||||||
# builds.
|
# builds.
|
||||||
|
|
||||||
set -e
|
set -eu
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
if [ $# -ne 0 ]; then
|
||||||
echo "Usage: ${0}"
|
echo "Usage: ${0}"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue