1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #!/usr/bin/env sh
- [ "x${DEBUG+set}" = 'xset' ] && set -v
- set -u -e
- version="version-unknown"
- if [ -f version ]; then
- version="$(cat version)"
- fi
- version_="${version}"
- if [ -e ".git" ]; then
- version="$(git describe --tags HEAD 2>&1)" \
- || version="git-$(git rev-parse HEAD 2>&1)" \
- || version="${version_}"
- printf "%s\n" "${version}" > version
- fi
- versiondate="version-date-unknown"
- if [ -f versiondate ]; then
- versiondate="$(cat versiondate)"
- fi
- versiondate_="${versiondate}"
- if [ -e ".git" ]; then
- versiondate="$(git show --no-patch --no-notes --pretty='%ct' HEAD)" \
- || versiondate="${versiondate_}"
- printf "%s\n" "${versiondate}" > versiondate
- fi
|