| 1 | #!/bin/sh |
| 2 | |
| 3 | set -eu |
| 4 | |
| 5 | if ! grep -qEe '^ -- ' debian/changelog; then |
| 6 | echo 'Unable to find date in debian/changelog' 1>&2 |
| 7 | exit 2 |
| 8 | fi |
| 9 | |
| 10 | date="$(grep -E -e ' -- ' debian/changelog | head -1)" |
| 11 | test "$date" |
| 12 | date="$(echo "$date" | sed -Ee 's/.* (\S+ \S+ \S+ \S+ \S+)$/\1/')" |
| 13 | date="$(./rewrite-time "$date" '%d %b %Y %H:%M:%S %z' '%Y-%m-%d')" |
| 14 | echo "$date" |