source: rtems/cpukit/vc-key.sh @ 90232bc

5
Last change on this file since 90232bc was 54c0b57, checked in by Sebastian Huber <sebastian.huber@…>, on 09/12/18 at 14:03:42

build: Move sapi/Makefile.am

  • Property mode set to 100755
File size: 655 bytes
Line 
1#! /bin/sh
2
3git=$(command -v git)
4
5#
6# Git command not found or not a valid git repo is a release.
7#
8vc_ident="release"
9
10if test $# -ge 1; then
11 repo=$1
12 shift
13 if test -d $repo; then
14  cwd=$(pwd)
15  cd $repo
16  if test -n ${git}; then
17   git rev-parse --git-dir > /dev/null 2>&1
18   if test $? = 0; then
19    git status > /dev/null 2>&1
20    if git diff-index --quiet HEAD --; then
21     modified=""
22    else
23     modified="-modified"
24    fi
25    vc_ident="$(git rev-parse --verify HEAD)${modified}"
26    if test $# -ge 1; then
27     if test "${vc_ident}" = "$1"; then
28      vc_ident="matches"
29     fi
30    fi
31   fi
32  fi
33  cd $cwd
34 fi
35fi
36
37echo ${vc_ident}
38
39exit 0
Note: See TracBrowser for help on using the repository browser.