#!/bin/sh
git describe --long --always --dirty 2>/dev/null
if [ $? -ne 0 ]
then
    echo unknown
fi

#!/bin/sh
git describe --always --dirty 2>/dev/null
if [ $? -ne 0 ]
then
    echo unknown
fi

Remove --long from git-describe invocation
Remove --long from git-describe invocation
