# 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
else
- date +%F
+ version=$(date +%F)
fi
# Use printf to avoid the trailing new line that m4_esyscmd would not handle.