File: get-the-git-commit.sh

package info (click to toggle)
coot 1.1.15%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 198,064 kB
  • sloc: cpp: 487,366; python: 34,637; ansic: 26,046; lisp: 22,737; sh: 13,097; makefile: 2,663; awk: 441; xml: 188; csh: 14
file content (10 lines) | stat: -rwxr-xr-x 199 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10

if command -v git > /dev/null ; then
    if git status > /dev/null 2>&1 ; then
        git rev-parse HEAD
    else
        echo git-commit-unavailable
    fi
else
    echo git-commit-unavailable
fi