2017-11-16 12:45:59 -05:00
|
|
|
#!/bin/bash
|
2017-03-22 20:55:24 -04:00
|
|
|
|
|
|
|
# Exit immediately if a command exits with a non-zero status.
|
|
|
|
set -e
|
|
|
|
|
2017-11-16 12:49:45 -05:00
|
|
|
topdir=`dirname $0`/../..
|
|
|
|
|
2017-03-22 20:55:24 -04:00
|
|
|
# Build the file list for sha1sums, from `docs/release.md`
|
2017-11-16 12:49:45 -05:00
|
|
|
declare -a files=(`sed -n '/^## Download Verification/,/^## Binaries/p' $topdir/docs/release.md | sed -n -E 's/^\s*0{40}\s{2}(wx.*)/\1/p'`)
|
2017-03-22 20:55:24 -04:00
|
|
|
|
|
|
|
# Get the release version
|
2017-11-16 12:49:45 -05:00
|
|
|
ver_string=`grep '#define wxVERSION_STRING ' $topdir/include/wx/version.h | sed 's/^.*"wxWidgets \(.*\)")/\1/'`
|
2017-03-22 20:55:24 -04:00
|
|
|
|
|
|
|
for i in "${files[@]}"
|
|
|
|
do
|
|
|
|
# compute sha1sum
|
2017-11-16 12:49:45 -05:00
|
|
|
sha1sum=`sha1sum $topdir/distrib/release/$ver_string/$i`
|
2017-03-22 20:55:24 -04:00
|
|
|
|
|
|
|
# save the sha1sum for this file
|
2017-11-16 12:49:45 -05:00
|
|
|
sed -i -E "/^\s*[0]{40}\s{2}wx/ s/(^\s*)[0]{40}(\s{2}$i)/\1$sha1sum\2/" $topdir/docs/release.md
|
2017-03-22 20:55:24 -04:00
|
|
|
done
|
|
|
|
|
|
|
|
# Commit sha1sum related changes
|
2017-11-16 12:49:45 -05:00
|
|
|
git commit -m "Update released files sha1sums after $ver_string release" $topdir/docs/release.md
|