Browse Source

build: Use tr instead of sed to map _ to ~

Guillem Jover 9 years ago
parent
commit
57554c38e9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      get-version

+ 1 - 1
get-version

@@ -24,7 +24,7 @@ if [ -f .dist-version ]; then
 elif [ -d .git ]; then
   # Get the version from the git repository. Since tags can't contain
   # tildes, we use underscore instead. Reverse that switch here.
-  version=$(git describe --abbrev=4 HEAD 2>/dev/null | sed -e 's/_/~/g')
+  version=$(git describe --abbrev=4 HEAD 2>/dev/null | tr _ ~)
 
   # Check if we are on a dirty checkout.
   git update-index --refresh -q >/dev/null