Skip to content

Commit

Permalink
bashisms remvoed from package_version.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
  • Loading branch information
sustrik committed Aug 23, 2013
1 parent 54ab61a commit 9748d06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package_version.sh
Expand Up @@ -21,15 +21,15 @@

if [ -d .git ]; then
# Retrieve the version from the last git tag.
VER=$(git describe --always | sed -e "s:v::")
if [ x"$(git diff-index --name-only HEAD)" != x ]; then
VER=`git describe --always | sed -e "s:v::"`
if [ x"`git diff-index --name-only HEAD`" != x ]; then
# If the sources have been changed locally, add -dirty to the version.
VER="${VER}-dirty"
fi
elif [ -f .version ]; then
# If git is not available (e.g. when building from source package)
# we can extract the package version from .version file.
VER=$(< .version)
VER=`< .version`
else
# The package version cannot be retrieved.
VER="Unknown"
Expand Down

0 comments on commit 9748d06

Please sign in to comment.