summaryrefslogtreecommitdiff
path: root/util/msrtool
diff options
context:
space:
mode:
authorAndriy Gapon <avg@icyb.net.ua>2009-11-28 04:54:33 +0000
committerPeter Stuge <peter@stuge.se>2009-11-28 04:54:33 +0000
commit7df17af13bc07888ffe47677db3ce9b93c8e4955 (patch)
tree89cce406c0dc7f003cfa6b2c78758781863da5ba /util/msrtool
parentbe89c41ae396577e1dd4b685dd6ee255a19df92a (diff)
msrtool: Make configure more POSIX sh friendly
Change a few bash-specific constructs to more portable syntax specified by POSIX. After the change the script keeps working with bash interpreter and can also be interpreted by FreeBSD /bin/sh. Signed-off-by: Andriy Gapon <avg@icyb.net.ua> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4964 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/msrtool')
-rwxr-xr-xutil/msrtool/configure16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/msrtool/configure b/util/msrtool/configure
index 61ef143d9e..268bbab01d 100755
--- a/util/msrtool/configure
+++ b/util/msrtool/configure
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# This file is part of msrtool.
#
@@ -25,7 +25,7 @@ VERSION=""
REV="`svnversion -c . 2>/dev/null | sed 's,.*:,,' 2>/dev/null`"
VERSION="${VERSION:-$REV}"
-function findprog {
+findprog() {
NPARMS=$#
WHAT="${1}"
shift
@@ -41,7 +41,7 @@ function findprog {
while test $i -lt $NPARMS; do
test -z "${1}" && {
shift
- i=$[$i+1]
+ i=$(($i+1))
continue
}
FILE="`which "${1}" 2>/dev/null`"
@@ -50,7 +50,7 @@ function findprog {
break
}
shift
- i=$[$i+1]
+ i=$(($i+1))
done
test -z "${1}" && {
echo " not found!" 1>&2
@@ -62,7 +62,7 @@ function findprog {
exit 0
}
-function trycompile {
+trycompile() {
NPARMS=$#
WHAT="${1}"
shift
@@ -84,7 +84,7 @@ function trycompile {
exit 0
}
shift
- i=$[$i+1]
+ i=$(($i+1))
done
echo "failed!" 1>&2
echo 1>&2
@@ -99,7 +99,7 @@ function trycompile {
exit 1
}
-function trylink {
+trylink {
NPARMS=$#
WHAT="${1}"
shift
@@ -121,7 +121,7 @@ function trylink {
exit 0
}
shift
- i=$[$i+1]
+ i=$(($i+1))
done
echo "failed!" 1>&2
echo 1>&2