From 3526f1cd5e24006b82b9b26062993d74ee4d73b7 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Tue, 13 Aug 2013 18:46:58 -0700 Subject: [PATCH] Get rid of bashisms in the main build scripts The conversion was done with the help of the checkbashisms script and https://wiki.ubuntu.com/DashAsBinSh . Change-Id: Id64ecefb35c8d72302f343cd2ec442e7ef989d47 --- build/make/configure.sh | 27 ++++++++++++++------------- build/make/gen_asm_deps.sh | 2 +- build/make/version.sh | 2 +- configure | 2 +- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/build/make/configure.sh b/build/make/configure.sh index e2566b0a7..d8e65e32d 100755 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ## ## configure.sh ## @@ -264,12 +264,13 @@ elif test ! -z "$TEMPDIR" ; then else TMPDIRx="/tmp" fi -TMP_H="${TMPDIRx}/vpx-conf-$$-${RANDOM}.h" -TMP_C="${TMPDIRx}/vpx-conf-$$-${RANDOM}.c" -TMP_CC="${TMPDIRx}/vpx-conf-$$-${RANDOM}.cc" -TMP_O="${TMPDIRx}/vpx-conf-$$-${RANDOM}.o" -TMP_X="${TMPDIRx}/vpx-conf-$$-${RANDOM}.x" -TMP_ASM="${TMPDIRx}/vpx-conf-$$-${RANDOM}.asm" +RAND=$(awk 'BEGIN { srand(); printf "%d\n",(rand() * 32768)}') +TMP_H="${TMPDIRx}/vpx-conf-$$-${RAND}.h" +TMP_C="${TMPDIRx}/vpx-conf-$$-${RAND}.c" +TMP_CC="${TMPDIRx}/vpx-conf-$$-${RAND}.cc" +TMP_O="${TMPDIRx}/vpx-conf-$$-${RAND}.o" +TMP_X="${TMPDIRx}/vpx-conf-$$-${RAND}.x" +TMP_ASM="${TMPDIRx}/vpx-conf-$$-${RAND}.asm" clean_temp_files() { rm -f ${TMP_C} ${TMP_CC} ${TMP_H} ${TMP_O} ${TMP_X} ${TMP_ASM} @@ -805,7 +806,7 @@ process_common_toolchain() { arch_int=${arch_int%%te} check_add_asflags --defsym ARCHITECTURE=${arch_int} tune_cflags="-mtune=" - if [ ${tgt_isa} == "armv7" ]; then + if [ ${tgt_isa} = "armv7" ]; then if [ -z "${float_abi}" ]; then check_cpp < ${destination} ${prefix} Copyright (c) 2011 The WebM project authors. All Rights Reserved.${suffix} diff --git a/build/make/gen_asm_deps.sh b/build/make/gen_asm_deps.sh index 0b4e3aa84..6a7bff9eb 100755 --- a/build/make/gen_asm_deps.sh +++ b/build/make/gen_asm_deps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ## ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. ## diff --git a/build/make/version.sh b/build/make/version.sh index 3efb956bb..e31e568aa 100755 --- a/build/make/version.sh +++ b/build/make/version.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ## ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. ## diff --git a/configure b/configure index 64f016547..f25fa204a 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ## ## configure ## -- 2.40.0