]> granicus.if.org Git - libvpx/commitdiff
Remove some bashism from the shell scripts.
authorAlex Converse <alex.converse@gmail.com>
Sat, 5 Jun 2010 16:19:40 +0000 (12:19 -0400)
committerAlex Converse <alex.converse@gmail.com>
Sat, 5 Jun 2010 16:20:53 +0000 (12:20 -0400)
Note that configure.sh still uses the bashism $(RANDOM).

build/make/configure.sh
release.sh

index 1f4f24db99814ad07d1fabab82c510c1894ea1c2..a70a84eec033f371b3b3d3619cd8cf6f02ff78d1 100755 (executable)
@@ -120,8 +120,8 @@ EOF
 
 show_targets() {
     while [ -n "$*" ]; do
-        if [ "${1%%-*}" == "${2%%-*}" ]; then
-            if [ "${2%%-*}" == "${3%%-*}" ]; then
+        if [ "${1%%-*}" = "${2%%-*}" ]; then
+            if [ "${2%%-*}" = "${3%%-*}" ]; then
                 printf "    %-24s %-24s %-24s\n" "$1" "$2" "$3"
                 shift; shift; shift
             else
@@ -475,7 +475,7 @@ post_process_common_cmdline() {
     prefix="${prefix%/}"
     libdir="${libdir:-${prefix}/lib}"
     libdir="${libdir%/}"
-    if [ "${libdir#${prefix}}" == "${libdir}" ]; then
+    if [ "${libdir#${prefix}}" = "${libdir}" ]; then
         die "Libdir ${libdir} must be a subdirectory of ${prefix}"
     fi
 }
index 827bbd0a698273d590b02c09acfdfc645fbb4e34..880ad0f59747e79dd72b944e0ff45549edef8923 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 ##
 ##  Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
 ##
@@ -21,7 +21,7 @@ for opt; do
     esac
 done
 
-TAB=$'\t'
+TAB="$(printf '\t')"
 cat > release.mk << EOF
 %\$(BUILD_SFX).tar.bz2: %/.done
 ${TAB}@echo "\$(subst .tar.bz2,,\$@): tarball"
@@ -186,7 +186,7 @@ for cfg in $CONFIGS; do
     esac
     opts="$opts --enable-postproc"
 
-    [ "x${clean}" == "xyes" ] \
+    [ "x${clean}" = "xyes" ] \
         && rm -rf ${full_cfg}${BUILD_SFX}${TAR_SFX} \
         && rm -rf logs/${full_cfg}${BUILD_SFX}.log.bz2