From: Johannes Berg Date: Wed, 17 Sep 2008 07:53:32 +0000 (+0200) Subject: make the version.sh script posix compatible X-Git-Tag: v0.9.3~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c21198b258d5d3c42af0594532d3fd719ca6b30;p=thirdparty%2Fiw.git make the version.sh script posix compatible --- diff --git a/version.sh b/version.sh index b21d671..0c33d66 100755 --- a/version.sh +++ b/version.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh VERSION="0.9.2" @@ -9,10 +9,10 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then # on git builds check that the version number above # is correct... - [ "${descr/-*/}" == "v$VERSION" ] || exit 2 + [ "${descr%%-*}" = "v$VERSION" ] || exit 2 echo -n '#define IW_VERSION "' - echo -n "${descr:1}" + echo -n "${descr#v}" if git diff-index --name-only HEAD | read dummy ; then echo -n "-dirty" fi