mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
small bash fixes
This commit is contained in:
parent
163ef93fb1
commit
b5fcd64661
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Generate the hooks/post-refresh file for all DNS plugins
|
||||
set -e
|
||||
set -eu
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
CERTBOT_DIR="$(dirname "${DIR}")"
|
||||
|
|
@ -24,7 +24,7 @@ cb_installed=\$(cat \$SNAP/certbot-shared/certbot-version.txt)
|
|||
cb_required=\$(grep -oP "version = '\K.*(?=')" \$SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from setuptools._vendor.packaging import version; sys.exit(1) if\
|
||||
\$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if\
|
||||
version.parse('\$cb_installed') < version.parse('\$cb_required') else sys.exit(0)" || exit_code=\$?
|
||||
if [ "\$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version \$cb_installed but needs to be at least \$cb_required before" \\
|
||||
|
|
|
|||
Loading…
Reference in a new issue