Files
motion/version.sh
2017-12-09 18:15:00 -07:00

17 lines
434 B
Bash
Executable File

#!/bin/sh
BASE_VERSION="4.1.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
#GIT_COMMIT=""
printf "$BASE_VERSION+$GIT_COMMIT"