File: get-git-version

package info (click to toggle)
claws-mail 4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 51,124 kB
  • sloc: ansic: 268,194; cpp: 19,477; xml: 11,269; sh: 5,794; perl: 2,767; makefile: 2,509; yacc: 2,470; python: 334; lex: 293
file content (17 lines) | stat: -rwxr-xr-x 426 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
if test -d .git; then
  git=`command -v git`
  if test -x "$git"; then
    version=`git describe --abbrev=6 --dirty --always`
    echo "echo $version" > ./version
  else
    echo "Error: *** git not found. See http://git-scm.com/"
    exit 1
  fi
elif test -s ./version; then
  version=`sh -c ". ./version"`
else
  echo "Error: *** invalid tree. Neither '.git' nor 'version' were found"
  exit 1
fi
echo -n $version