Simplify bash script

This commit is contained in:
Nick Rolfe
2021-02-17 10:48:17 +00:00
parent 4f5b1c06ac
commit 97654eb338

View File

@@ -66,14 +66,7 @@ upgrade_root="upgrades"
check_hash_valid()
{
len=0
checking="$2"
while [ "x${checking}" != "x" ]; do
len=$((len + 1))
checking="${checking%?}"
done
if [ ${len} -ne 40 ]; then
if [ ${#2} -ne 40 ]; then
echo "Did not get expected $1 hash: $2" >&2
exit 2
fi
@@ -110,4 +103,4 @@ Created upgrade directory here:
Please update:
${upgradedir}/upgrade.properties
with appropriate upgrade instructions
EOF
EOF