From c94a3c00081600cb441bbfe019a61ea4d5971ca5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 22 Feb 2021 18:58:25 +0100 Subject: [PATCH] Add patch for missing ynh_abort_if_errors in change_url scripts --- .../patches/missing-seteu-in-change_url/patch.sh | 10 ++++++++++ .../patches/missing-seteu-in-change_url/pr_body.md | 2 ++ .../patches/missing-seteu-in-change_url/pr_title.md | 1 + 3 files changed, 13 insertions(+) create mode 100644 autopatches/patches/missing-seteu-in-change_url/patch.sh create mode 100644 autopatches/patches/missing-seteu-in-change_url/pr_body.md create mode 100644 autopatches/patches/missing-seteu-in-change_url/pr_title.md diff --git a/autopatches/patches/missing-seteu-in-change_url/patch.sh b/autopatches/patches/missing-seteu-in-change_url/patch.sh new file mode 100644 index 00000000..f9301348 --- /dev/null +++ b/autopatches/patches/missing-seteu-in-change_url/patch.sh @@ -0,0 +1,10 @@ + +cd scripts/ + +if [ ! -e change_url ] || grep -q 'ynh_abort_if_errors' change_url +then + # The app doesn't has any change url script or already has ynh_abort_if_error + exit 0 +fi + +sed 's@\(source /usr/share/yunohost/helpers\)@\1\nynh_abort_if_errors@g' -i change_url diff --git a/autopatches/patches/missing-seteu-in-change_url/pr_body.md b/autopatches/patches/missing-seteu-in-change_url/pr_body.md new file mode 100644 index 00000000..bb67bd05 --- /dev/null +++ b/autopatches/patches/missing-seteu-in-change_url/pr_body.md @@ -0,0 +1,2 @@ + +This is an ***automated*** patch to fix the lack of `ynh_abort_if_errors` in change_url script diff --git a/autopatches/patches/missing-seteu-in-change_url/pr_title.md b/autopatches/patches/missing-seteu-in-change_url/pr_title.md new file mode 100644 index 00000000..efd0e735 --- /dev/null +++ b/autopatches/patches/missing-seteu-in-change_url/pr_title.md @@ -0,0 +1 @@ +Missing ynh_abort_if_errors in change_url scripts