From cddfe9418bad24a571b2a55521a2a34f883da54a Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 19 Mar 2018 12:18:44 -0500 Subject: [PATCH] Check that version is actually newer via compareVersions --- up.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/up.sh b/up.sh index 18f719c..091e5a2 100755 --- a/up.sh +++ b/up.sh @@ -23,6 +23,11 @@ function error_exit { exit 1 } +if ! [ $(nix-instantiate --eval -E "builtins.compareVersions '$NEW_VERSION' '$OLD_VERSION'") -eq 1 ]; +then + error_exit "$NEW_VERSION is not newer than $OLD_VERSION according to Nix" +fi + # Package blacklist case "$PACKAGE_NAME" in *jquery*) error_exit "this isn't a real package";;