From 05328547e10a32701f19df60e9762cd0bacc339a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Val=C3=AD=C4=8Dek?= Date: Sun, 7 Aug 2022 21:47:58 +0200 Subject: [PATCH] Wizzatrd: create .enabled, fix some typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Václav Valíček --- old/dockerbin/wizzard | 18 ------------------ repo_cloner/initialization_wizzard.py | 8 +++++--- 2 files changed, 5 insertions(+), 21 deletions(-) delete mode 100755 old/dockerbin/wizzard diff --git a/old/dockerbin/wizzard b/old/dockerbin/wizzard deleted file mode 100755 index f00f2a9..0000000 --- a/old/dockerbin/wizzard +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -echo "First run - initialization of repos..." -if ! env BASE=$root run-checker -then - echo -n "First run failed - remove directory? [Y/n]" - read read_cleanup - [ -n "$read_cleanup" ] || read_cleanup=Y - if [[ "$read_cleanup" =~ ^[Yy]$ ]] - then - rm -Rf $root - fi -else - - echo "Setup has finished!" - touch $root/.enabled -fi - diff --git a/repo_cloner/initialization_wizzard.py b/repo_cloner/initialization_wizzard.py index 51579dc..a0e94da 100644 --- a/repo_cloner/initialization_wizzard.py +++ b/repo_cloner/initialization_wizzard.py @@ -320,15 +320,17 @@ def main() -> int: x = clone_or_fetch(project_path.as_posix(), clone_init = True, detector_init = data["detector_init"]) if x == 0: + # enable repository + project_path.joinpath(".enabled").touch() return 0 - # determine if to continue + # determine if we want to continue log.critical(f"Something has failed. Please see log above and decide what to do") menu_config = "Edit config and start over" - menu_reclone = "Try cloning again, including base repo" + menu_clone_again = "Try cloning again, including base repo" menu_quit_clean = "Quit & clean" decision: str = pyip.inputMenu( - [menu_config, menu_reclone, menu_quit_clean], + [menu_config, menu_clone_again, menu_quit_clean], numbered = True) # other stuff