Revision 0b12024d765872ee0d9e9edc6a701ca1204bd9a6 authored by Felix Ruess on 05 October 2013, 11:19:08 UTC, committed by Felix Ruess on 05 October 2013, 12:57:00 UTC
most recent leap second was inserted on June 30, 2012 at 23:59:60 UTC
So since the gps epoch 1980 we have 16 leap seconds.
1 parent 491a85f
Raw File
paparazzi_version
#!/bin/sh

DEF_VER=v5.0.1_stable

# First try git describe (if running on a git repo),
# then use default version from above (for release tarballs).
if test -d .git -o -f .git
then
	GIT_VN=$(git describe --match "v[0-9].[0-9]*" --dirty --always --long)
    if echo "$GIT_VN" | grep -Eq "^v[0-9].[0-9]"
    then
        VN="$GIT_VN"
    else
        VN="$DEF_VER"-none-g"$GIT_VN"
    fi
else
	VN="$DEF_VER"
fi

echo $VN
back to top