Wizzatrd: create .enabled, fix some typos

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
Václav Valíček 2022-08-07 21:47:58 +02:00
parent 1fef7bc404
commit 05328547e1
Signed by: valicek
GPG Key ID: FF05BDCA0C73BB31
2 changed files with 5 additions and 21 deletions

View File

@ -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

View File

@ -320,15 +320,17 @@ def main() -> int:
x = clone_or_fetch(project_path.as_posix(), clone_init = True, detector_init = data["detector_init"]) x = clone_or_fetch(project_path.as_posix(), clone_init = True, detector_init = data["detector_init"])
if x == 0: if x == 0:
# enable repository
project_path.joinpath(".enabled").touch()
return 0 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") log.critical(f"Something has failed. Please see log above and decide what to do")
menu_config = "Edit config and start over" 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" menu_quit_clean = "Quit & clean"
decision: str = pyip.inputMenu( decision: str = pyip.inputMenu(
[menu_config, menu_reclone, menu_quit_clean], [menu_config, menu_clone_again, menu_quit_clean],
numbered = True) numbered = True)
# other stuff # other stuff