Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
support/version: extract version from the top directory name (for dir…
…ect github tar ball downloads)
  • Loading branch information
perexg committed May 22, 2015
1 parent 4d61104 commit 8e4a989
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion support/version
Expand Up @@ -20,7 +20,12 @@ elif [ -f "$(dirname "$0")/../debian/changelog" ]; then
elif [ -r "$(dirname "$0")/../rpm/version" ]; then
VER=$(cat "$(dirname "$0")/../rpm/version")
else
VER="0.0.0~unknown"
VER=$(basename $(realpath $(dirname "$0")/..) | sed -e 's/^tvheadend-//' | sed -e 's/^tvheadend-v//')
case $VER in
[1-9]*\.[0-9]*) ;;
*) VER="0.0.0~unknown" ;;
esac
echo $VER
fi

# Output
Expand Down

0 comments on commit 8e4a989

Please sign in to comment.