File: version.sh

package info (click to toggle)
motion 4.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,120 kB
  • sloc: ansic: 26,459; makefile: 105; sh: 79
file content (18 lines) | stat: -rwxr-xr-x 445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
BASE_VERSION="4.7.1"
if [ -d .git ]; then
    if test "`git diff --name-only`" = "" ; then
        GIT_COMMIT="git"
    else
        GIT_COMMIT="dirty"
    fi
    GIT_COMMIT=$GIT_COMMIT`git show -s --date=format:'%Y%m%d' --format=%cd-%h` 2>/dev/null
    if [ $? -ne 0 ]; then
        GIT_COMMIT=$GIT_COMMIT`git show -s --format=%h`
    fi
else
    GIT_COMMIT="gitUNKNOWN"
fi
printf "$BASE_VERSION"
#printf "$BASE_VERSION+$GIT_COMMIT"