diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-11-27 13:03:13 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-11-27 13:12:17 +1100 |
commit | 1a7c3fa488694d19535b2c9c59ae245db64a9778 (patch) | |
tree | fc905777d5e232d3f2c212de4e62c6c90c79766a /test/test_compression.sh | |
parent | fe494d2dc28f246def589888ec8600d01ad1970e (diff) | |
download | flac-1a7c3fa488694d19535b2c9c59ae245db64a9778.tar.gz |
tests/*.sh : Switch back to /bin/sh.
Jan Stary reported that on OpenBSD bash isn't located in /bin/
which means that the test fail. He also noted that there didn't
seem to be anything bash specific in the tests.
This patch takes some suggestions from Jan, plus a few fixes tested
on Debian using the bin/sh provided by bash and dash.
Suggested-by: Jan Stary <hans@stare.cz>
Diffstat (limited to 'test/test_compression.sh')
-rwxr-xr-x | test/test_compression.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_compression.sh b/test/test_compression.sh index 3d0f5667..d53e67d4 100755 --- a/test/test_compression.sh +++ b/test/test_compression.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/sh -e # FLAC - Free Lossless Audio Codec # Copyright (C) 2012-2014 Xiph.Org Foundation @@ -17,7 +17,7 @@ # restrictive of those mentioned above. See the file COPYING.Xiph in this # distribution. -source common.sh +. ./common.sh PATH=`pwd`/../src/flac:$PATH @@ -39,9 +39,8 @@ for k in 0 1 2 3 4 5 6 7 8 ; do echo "Error : Compression ${last_k} size ${last_size} >= compression ${k} size ${size}." exit 1 fi - # Need this string interpolation because OSX's 'wc -c' returns a number with - # leading whitespace. - let last_size="${size}+10" + # Need this because OSX's 'wc -c' returns a number with leading whitespace. + last_size=$((${size}+10)) last_k=${k} rm -f ${fname} done |