Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Neumann <patrick@neumannsland.de>2022-09-13 17:16:27 +0300
committerGitHub <noreply@github.com>2022-09-13 17:16:27 +0300
commit0326cbf95e48656a0da489f6bba2cd940b06b5d9 (patch)
tree3475ed8cd38f4cfe4219a065c05f72ce64b859cb
parent39e8d14e1b221bf37526cc05ecc83beee30a3c57 (diff)
Update generate_dnsplugins_snapcraft.sh (#9398)
There is no need for two interconneced (pipe) processes. The regular expression in the grep part is not strict enough in some cases (presence of long_description. sed does not seem to support perl regular expressions ("\s"). Some Python developers prefer single quotes to double qoutes. Some even go so far as to adapt generated templates (setup.py). This update will (hopefully) fix this all. This was tested on Ubuntu 20.04.5 LTS (Focal Fossa) and macOS 12.5.1 (Monterey).
-rwxr-xr-xtools/snap/generate_dnsplugins_snapcraft.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/snap/generate_dnsplugins_snapcraft.sh b/tools/snap/generate_dnsplugins_snapcraft.sh
index efa647366..43f1b2077 100755
--- a/tools/snap/generate_dnsplugins_snapcraft.sh
+++ b/tools/snap/generate_dnsplugins_snapcraft.sh
@@ -7,7 +7,7 @@ set -e
PLUGIN_PATH=$1
PLUGIN=$(basename "${PLUGIN_PATH}")
-DESCRIPTION=$(grep description "${PLUGIN_PATH}/setup.py" | sed -E 's|\s+description="(.*)",|\1|g')
+DESCRIPTION=$(sed -E -n "/[[:space:]]+description=/ s/[[:space:]]+description=['\"](.*)['\"],/\1/ p" "${PLUGIN_PATH}/setup.py")
mkdir -p "${PLUGIN_PATH}/snap"
cat <<EOF > "${PLUGIN_PATH}/snap/snapcraft.yaml"
# This file is generated automatically and should not be edited manually.