From 95d531479a5a4f86f30eb5402deaeba1dec65c7d Mon Sep 17 00:00:00 2001 From: Risto Date: Tue, 19 Oct 2021 22:44:03 +0200 Subject: [PATCH] Allow --pause argument --- tools/setup_buildenv_msys2_stage1.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tools/setup_buildenv_msys2_stage1.sh b/tools/setup_buildenv_msys2_stage1.sh index f4bca180b..b1e96777b 100644 --- a/tools/setup_buildenv_msys2_stage1.sh +++ b/tools/setup_buildenv_msys2_stage1.sh @@ -3,8 +3,27 @@ ## Bash script to setup EdgeTX development environment first stage. ## Let it run as normal user in MSYS2 MSYS console (violet icon). -pacman -Su --noconfirm +PAUSEAFTEREACHLINE="false" +STEP=1 +# Parse argument(s) +for arg in "$@" +do + if [[ $arg == "--pause" ]]; then + PAUSEAFTEREACHLINE="true" + fi +done +echo "=== Step $((STEP++)): Updating MSYS2 base packages ===" +pacman -Su --noconfirm +if [[ $PAUSEAFTEREACHLINE == "true" ]]; then + echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop." + read +fi + +echo "=== Step $((STEP++)): Installing system wide packages ===" pacman -S --noconfirm git make mingw-w64-x86_64-toolchain +if [[ $PAUSEAFTEREACHLINE == "true" ]]; then + echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop." +fi echo "This stage has finished. Please close the MSYS console and continue to stage 2 in MinGW 64-bit console (blue icon)."