mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
52379fa76d
This is especially important for distributions like NixOS where `/bin/bash` doesn't exist, or for MacOS users who've installed a newer version of Bash than the one that comes with their OS. Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
12 lines
306 B
Bash
Executable file
12 lines
306 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
changelogFile=${1:-CHANGELOG.md}
|
|
|
|
if [ ! -r "$changelogFile" ]; then
|
|
echo "Unable to read file $changelogFile" >&2
|
|
exit 1
|
|
fi
|
|
|
|
grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
|
|
|
|
echo "Congratulations! Changelog $changelogFile dates are in descending order."
|