-#!/bin/bash
+#!/bin/sh
#
# This file is part of msrtool.
#
REV="`svnversion -c . 2>/dev/null | sed 's,.*:,,' 2>/dev/null`"
VERSION="${VERSION:-$REV}"
-function findprog {
+findprog() {
NPARMS=$#
WHAT="${1}"
shift
while test $i -lt $NPARMS; do
test -z "${1}" && {
shift
- i=$[$i+1]
+ i=$(($i+1))
continue
}
FILE="`which "${1}" 2>/dev/null`"
break
}
shift
- i=$[$i+1]
+ i=$(($i+1))
done
test -z "${1}" && {
echo " not found!" 1>&2
exit 0
}
-function trycompile {
+trycompile() {
NPARMS=$#
WHAT="${1}"
shift
exit 0
}
shift
- i=$[$i+1]
+ i=$(($i+1))
done
echo "failed!" 1>&2
echo 1>&2
exit 1
}
-function trylink {
+trylink {
NPARMS=$#
WHAT="${1}"
shift
exit 0
}
shift
- i=$[$i+1]
+ i=$(($i+1))
done
echo "failed!" 1>&2
echo 1>&2