Add some printing to make sure we understand what's going on

This commit is contained in:
Erica Portnoy 2020-07-13 17:38:56 -07:00
parent 4f3a47b04f
commit 84b74d00ba
2 changed files with 7 additions and 2 deletions

View file

@ -4,6 +4,7 @@
cb_installed="$(snapctl get cb-installed)"
if [ -z "$cb_installed" ]; then
echo "cb_installed not set, not doing version comparison check"
exit 0
fi
@ -11,6 +12,7 @@ fi
cb_required=$(grep -oP "certbot>=\K.*(?=')" $SNAP/setup.py)
if [ "$cb_installed" -lt "$cb_required" ]; then
echo "Certbot needs to be updated before this plugin can be updated; will try again on next refresh."
echo "Certbot is version $cb_installed but needs to be at least $cb_required before \
this plugin can be updated; will try again on next refresh."
exit 1
fi

View file

@ -3,9 +3,12 @@
first_install="$(snapctl get first-install)"
if [ -z "$first_install" ]; then
snapctl set first-install="false"
echo "first install, not doing any version comparison checks"
exit 0
fi
echo "ls $SNAP/certbot-exec:"
ls $SNAP/certbot-exec
cb_installed=$(grep -oP "__requires__ = 'certbot==\K.*(?=')" $SNAP/certbot-exec)
echo "cb_installed $cb_installed"
echo "cb_installed: $cb_installed"
snapctl set cb-installed="$cb_installed"