From b100f967071b1cfef5be3f067eb0c8b0affd0c68 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 23 Jun 2024 16:34:35 +0200 Subject: [PATCH] Delete scripts/config when there's no config_panel.toml --- tools/helpers2.1/convert_to_helpers_2.1.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/helpers2.1/convert_to_helpers_2.1.py b/tools/helpers2.1/convert_to_helpers_2.1.py index 8a3e51ee..afb44c53 100644 --- a/tools/helpers2.1/convert_to_helpers_2.1.py +++ b/tools/helpers2.1/convert_to_helpers_2.1.py @@ -372,6 +372,10 @@ def cleanup(): os.system("git rm --quiet -f config_panel.toml") os.system("git rm --quiet -f scripts/config") + # Remove scripts/config if no config panel ... most of the time this is only the example config script :| + if os.path.exists("scripts/config") and not os.path.exists("config_panel.toml"): + os.system("git rm --quiet -f scripts/config") + # Add helpers_version = '2.1' after yunohost requirement in manifest raw_manifest = open("manifest.toml", "r").read() if "helpers_version" not in raw_manifest: