File: version.sh

package info (click to toggle)
pipexec 2.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 2,632 kB
  • sloc: sh: 11,616; ansic: 861; makefile: 17
file content (18 lines) | stat: -rwxr-xr-x 236 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
set -e

TOPSRCDIR=""
if test $# -eq 1;
then
    TOPSRCDIR=$1
    cd ${TOPSRCDIR}
fi

if test -f version.txt;
then
    cat version.txt
    exit 0
fi

VERSION=$(git describe --tags --abbrev=8 HEAD 2>/dev/null)
echo ${VERSION}