File: get_version.sh

package info (click to toggle)
linux-minidisc 0.9.16-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,640 kB
  • sloc: ansic: 6,389; cpp: 2,731; python: 2,537; perl: 866; sh: 207; makefile: 10
file content (13 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#/bin/sh
# get_version.sh - simple script to determine version number

GIT_VERSION="$(git describe --always --long 2>/dev/null)"
SRCDIR="$( cd "$( dirname "$0" )" && pwd )"

if [ -n "$GIT_VERSION" ] ; then
    echo $GIT_VERSION
elif [ -f "${SRCDIR}"/../VERSION ] ; then
    cat "${SRCDIR}"/../VERSION
else
    echo "NO_VERSION"
fi