File: version.sh

package info (click to toggle)
pipexec 2.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: ansic: 1,194; sh: 74; makefile: 20
file content (18 lines) | stat: -rwxr-xr-x 238 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/sh
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}