Navigation Menu

Skip to content

Commit

Permalink
Remove bashisms from abi_version.sh
Browse files Browse the repository at this point in the history
This is needed to build on Solaris

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
  • Loading branch information
sustrik committed Aug 23, 2013
1 parent 43e609f commit 54ab61a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions abi_version.sh
Expand Up @@ -24,18 +24,18 @@ if [ ! -f src/nn.h ]; then
exit 1 exit 1
fi fi


CURRENT=$(egrep '^#define +NN_VERSION_CURRENT +[0-9]+$' src/nn.h) CURRENT=`egrep '^#define +NN_VERSION_CURRENT +[0-9]+$' src/nn.h`
REVISION=$(egrep '^#define +NN_VERSION_REVISION +[0-9]+$' src/nn.h) REVISION=`egrep '^#define +NN_VERSION_REVISION +[0-9]+$' src/nn.h`
AGE=$(egrep '^#define +NN_VERSION_AGE +[0-9]+$' src/nn.h) AGE=`egrep '^#define +NN_VERSION_AGE +[0-9]+$' src/nn.h`


if [ -z "$CURRENT" -o -z "$REVISION" -o -z "$AGE" ]; then if [ -z "$CURRENT" -o -z "$REVISION" -o -z "$AGE" ]; then
echo "abi_version.sh: error: could not extract version from src/nn.h" 1>&2 echo "abi_version.sh: error: could not extract version from src/nn.h" 1>&2
exit 1 exit 1
fi fi


CURRENT=$(printf '%s' "$CURRENT" | awk '{ print $3 }') CURRENT=`echo $CURRENT | awk '{ print $3 }'`
REVISION=$(printf '%s' "$REVISION" | awk '{ print $3 }') REVISION=`echo $REVISION | awk '{ print $3 }'`
AGE=$(printf '%s' "$AGE" | awk '{ print $3 }') AGE=`echo $AGE | awk '{ print $3 }'`


printf '%s' "$CURRENT.$REVISION.$AGE" printf '%s' "$CURRENT.$REVISION.$AGE"


0 comments on commit 54ab61a

Please sign in to comment.