From 43baf076ed4c8079b7a7d17857668d6a739fd7ba Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Thu, 7 May 2026 13:44:41 +0200 Subject: [PATCH] Fix syntax errors and improve help option in launcher script --- scripts/training/master_training_launcher.sh | 88 ++++++++++---------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/scripts/training/master_training_launcher.sh b/scripts/training/master_training_launcher.sh index 41e6555a..79cad0d5 100755 --- a/scripts/training/master_training_launcher.sh +++ b/scripts/training/master_training_launcher.sh @@ -998,49 +998,51 @@ main() { fi } + # Handle command line arguments case "${1:-}" in - --overview) - show_overview - ;; - --check) - check_system_readiness - ;; - --stage) - if [[ "$2" =~ ^[0-9]$ ]]; then - run_stage "$2" - else - echo "Usage: $0 --stage [0-9]" - exit 1 - fi - ;; - --complete) - run_complete_training - ;; - --playground) - show_playground_menu - ;; - --help|-h) - echo "hermes AITBC Mastery Training Launcher" - echo - echo "Usage: $0 [OPTION]" - echo - echo "Options:" - echo " --overview Show training overview" - echo " --check Check system readiness" - echo " --stage N Run specific stage (0-9)" - echo " --complete Run complete training program" - echo " --playground Enter training playground mode" - echo " --help, -h Show this help message" - echo - echo "Without arguments, starts interactive menu" - ;; - "") - main - ;; - *) - echo "Unknown option: $1" - echo "Use --help for usage information" + --overview) + show_overview + ;; + --check) + check_system_readiness + ;; + --stage) + if [[ "$2" =~ ^[0-9]$ ]]; then + run_stage "$2" + else + echo "Usage: $0 --stage [0-9]" exit 1 - ;; - esac + fi + ;; + --complete) + run_complete_training + ;; + --playground) + show_playground_menu + ;; + --help|-h) + echo "hermes AITBC Mastery Training Launcher" + echo + echo "Usage: $0 [OPTION]" + echo + echo "Options:" + echo " --overview Show training overview" + echo " --check Check system readiness" + echo " --stage N Run specific stage (0-9)" + echo " --complete Run complete training program" + echo " --playground Run interactive playground mode" + echo " --help, -h Show this help message" + echo + echo "Without arguments, starts interactive menu" + exit 0 + ;; + "") + main + ;; + *) + echo "Unknown option: $1" + echo "Use --help for usage information" + exit 1 + ;; +esac