]> git.ipfire.org Git - thirdparty/lldpd.git/blobdiff - get-version
tests: report complete Linux version as well
[thirdparty/lldpd.git] / get-version
index b7019beb88c4adcfa5cef50a2ba7afcbd42a77a7..19a2e3ebe56e0a3b516daabe90ba79a62d5135cd 100755 (executable)
 if [ -f .dist-version ]; then
   # Get the version from the file distributed in the tarball.
   version=$(cat .dist-version)
-elif [ -d .git ]; then
+elif [ -e .git ]; then
   # Ger the version from the git repository.
   version=$(git describe --tags --always --match [0-9]* 2> /dev/null)
 
   # Check if we are on a dirty checkout.
   git update-index --refresh -q >/dev/null
-  dirty=$(git diff-index --name-only HEAD 2>/dev/null)
+  dirty=$(git diff-index --name-only --ignore-submodules=untracked HEAD 2>/dev/null)
   if [ -n "$dirty" ]; then
     version="$version-dirty"
   fi