summaryrefslogtreecommitdiffstats
path: root/tests/installer/checksums.sh
blob: 2c0279015a7630b8826703ce838fabc3eaca5082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -e

if [ ! -f .gitignore ]; then
	echo "Run as ./tests/installer/$(basename "$0") from top level directory of git repository"
	exit 1
fi

for file in kickstart.sh kickstart-static64.sh; do
	OLD_CHECKSUM=$(grep "$file" packaging/installer/README.md | grep md5sum | cut -d '"' -f2)
	NEW_CHECKSUM="$(md5sum "packaging/installer/$file" | cut -d' ' -f1)"
	if [ "$OLD_CHECKSUM" != "$NEW_CHECKSUM" ]; then
		echo "Invalid checksum for $file in docs."
		echo "checksum in docs: $OLD_CHECKSUM"
		echo "current checksum: $NEW_CHECKSUM"
		exit 1
	fi
done