| 1 | #!/bin/bash |
| 2 | |
| 3 | # Print the git commit associated with a version. |
| 4 | |
| 5 | set -e |
| 6 | set -u |
| 7 | |
| 8 | if [ $# -ne 1 ]; then |
| 9 | echo >&2 "Usage: $0 UPSTREAM_VERSION" |
| 10 | exit 1 |
| 11 | fi |
| 12 | |
| 13 | version=$1 |
| 14 | |
| 15 | # Get the "real" upstream version |
| 16 | version=$( debian/helpers/real-upstream-version.sh "$version" ) |
| 17 | |
| 18 | # Get corresponding git commit |
| 19 | awk -F ': ' '$1 == "'"$version"'" {print $2}' debian/helpers/gitcommits |