summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorFlorian Franzmann2019-06-29 12:19:23 +0200
committerFlorian Franzmann2019-06-29 12:19:23 +0200
commit409045cb1f1ab48653014e1c713ec2e4d6040afd (patch)
tree1e3f2523e3d9ef39658f73880f7bc7e139e1a8a2 /crypto
parent3e06bb877455e73b70a01fd22a2463eac7adf9fb (diff)
crypto/nettle: add self check for dependent spells on update
Diffstat (limited to 'crypto')
-rw-r--r--crypto/nettle/HISTORY3
-rwxr-xr-xcrypto/nettle/UP_TRIGGERS20
2 files changed, 11 insertions, 12 deletions
diff --git a/crypto/nettle/HISTORY b/crypto/nettle/HISTORY
index 808b6d3687..28ebf2a0d1 100644
--- a/crypto/nettle/HISTORY
+++ b/crypto/nettle/HISTORY
@@ -1,3 +1,6 @@
+2019-06-29 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de>
+ * UP_TRIGGERS: schedule self checks for dependent spells on update
+
2019-06-27 Treeve Jelbert <treeve@sourcemage.org>
* DETAILS: version 3.5.1
diff --git a/crypto/nettle/UP_TRIGGERS b/crypto/nettle/UP_TRIGGERS
index 1f59e0f8a7..eaf6ecf96f 100755
--- a/crypto/nettle/UP_TRIGGERS
+++ b/crypto/nettle/UP_TRIGGERS
@@ -1,13 +1,9 @@
-if spell_ok $SPELL; then
- local NEW_SPELL_BRANCH="$(echo $VERSION | cut -d. -f1)" &&
- local OLD_SPELL_BRANCH="$(installed_version $SPELL | cut -d. -f1)" &&
-
- if test "${NEW_SPELL_BRANCH}" != "${OLD_SPELL_BRANCH}"; then
- message "${MESSAGE_COLOR}This is a possibly incompatible update of $SPELL..." &&
- message "Figuring out what spells need to be recast, this may take a while.${DEFAULT_COLOR}" &&
-
- for each in $(show_up_depends $SPELL 1); do
- up_trigger $each check_self
- done
- fi
+local OLD_SPELL_VERSION=""
+spell_ok $SPELL && OLD_SPELL_VERSION="$(installed_version $SPELL)"
+if [ "${VERSION}" != "${OLD_SPELL_VERSION}" ]; then
+ message "This is an incompatible update of $SPELL..."
+ message "Figuring out what spells need to be recast, this may take a while."
+ for each in $(show_up_depends $SPELL 1); do
+ up_trigger $each check_self
+ done
fi