From 95507cd44c77a91c866c6e39c593526116dc9f36 Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 19 Aug 2025 12:08:03 -0600 Subject: [PATCH] remove pause --- ...-19_15-59Z-update-latest-gitignore-file.md | 152 ++++++++++++++++++ UpdateSequences.bat | 3 +- 2 files changed, 153 insertions(+), 2 deletions(-) diff --git a/.specstory/history/2025-08-19_15-59Z-update-latest-gitignore-file.md b/.specstory/history/2025-08-19_15-59Z-update-latest-gitignore-file.md index 2820cf4..f47bc7a 100644 --- a/.specstory/history/2025-08-19_15-59Z-update-latest-gitignore-file.md +++ b/.specstory/history/2025-08-19_15-59Z-update-latest-gitignore-file.md @@ -593,3 +593,155 @@ Want me to run this command for you? --- +_**User**_ + +for projects with submodules, let's make a script like this, that runs every @UpdateSequences.bat in each subfolder. + +--- + +_**Assistant**_ + +I'll create a script that finds and runs all `UpdateSequences.bat` files in submodule folders, similar to your `PushAllToCurrent.bat` approach. This will be useful for projects with submodules that each have their own `UpdateSequences.bat`. + + +--- + +
Edit file: UpdateAllSequences.bat + +I'm creating a new batch script that finds and runs all UpdateSequences.bat files in submodule folders, similar to the PushAllToCurrent.bat pattern. + +**Chunk 1** +Lines added: 59, lines removed: 1 + +```diff +@@ -1,1 +1,59 @@ +- ++ @echo off ++ setlocal enabledelayedexpansion ++ echo UpdateAllSequences - Running all UpdateSequences.bat files in submodule folders... ++ echo. ++ ++ echo Searching for submodule folders and UpdateSequences.bat files... ++ echo. ++ ++ REM Find all submodule folders and check for UpdateSequences.bat ++ set /a count=0 ++ set /a found=0 ++ ++ echo Found the following submodule folders with UpdateSequences.bat: ++ for /d %%S in (*) do ( ++ if exist "%%S\UpdateSequences.bat" ( ++ echo - %%S ++ set /a found+=1 ++ ) ++ ) ++ ++ if !found!==0 ( ++ echo No submodule folders with UpdateSequences.bat found! ++ echo. ++ echo Note: This script looks for UpdateSequences.bat files in immediate subdirectories. ++ echo Make sure you're running this from the project root where submodules are located. ++ pause ++ exit /b 1 ++ ) ++ ++ echo. ++ echo Found !found! submodule folders with UpdateSequences.bat files. ++ echo. ++ echo Starting execution... ++ echo. ++ ++ REM Execute each UpdateSequences.bat found in submodule folders ++ for /d %%S in (*) do ( ++ if exist "%%S\UpdateSequences.bat" ( ++ set /a count+=1 ++ echo [!count!/!found!] Running UpdateSequences.bat in %%S... ++ pushd "%%S" ++ call "UpdateSequences.bat" ++ set "rc=!errorlevel!" ++ popd ++ if !rc!==0 ( ++ echo Completed: %%S (SUCCESS) ++ ) else ( ++ echo Completed: %%S (FAILED - RC=!rc!) ++ ) ++ echo. ++ ) ++ ) ++ ++ echo. ++ echo Operation completed. Successfully executed !count! UpdateSequences.bat files. ++ echo. ++ echo Note: Check individual _CURRENT\_UpdateSequences.log files in each submodule for details. ++ pause ++ +``` + +
+ +--- + +Perfect! I've created `UpdateAllSequences.bat` that follows the same pattern as your `PushAllToCurrent.bat`. Here's what it does: + +## Key Features: + +1. **Scans for Submodules**: Looks for `UpdateSequences.bat` files in immediate subdirectories +2. **Shows Progress**: Displays `[current/total]` progress as it runs each script +3. **Error Handling**: Captures and reports the exit code from each `UpdateSequences.bat` +4. **Success/Failure Tracking**: Shows whether each submodule completed successfully or failed +5. **Directory Management**: Uses `pushd`/`popd` to safely navigate into each submodule + +## Usage: + +Run this from your project root where submodules are located: +```batch +UpdateAllSequences.bat +``` + +## What It Does: + +1. **Scans** all immediate subdirectories for `UpdateSequences.bat` files +2. **Lists** what it found before starting +3. **Runs** each `UpdateSequences.bat` in its respective submodule folder +4. **Reports** success/failure for each one +5. **Reminds** you to check individual log files for details + +## Example Output: +``` +[1/3] Running UpdateSequences.bat in Horizontal... + Completed: Horizontal (SUCCESS) + +[2/3] Running UpdateSequences.bat in Shorts... + Completed: Shorts (SUCCESS) + +[3/3] Running UpdateSequences.bat in Vertical... + Completed: Vertical (SUCCESS) + +Operation completed. Successfully executed 3 UpdateSequences.bat files. +``` + +This gives you a single command to update all your submodule sequences at once, just like how `PushAllToCurrent.bat` handles moving files to current folders! + +--- + +_**User**_ + +remove the pause. + +--- + +_**Assistant**_ + + + + +--- + + + +--- + + + +--- + diff --git a/UpdateSequences.bat b/UpdateSequences.bat index 6a10ba7..61a8143 100644 --- a/UpdateSequences.bat +++ b/UpdateSequences.bat @@ -7,6 +7,5 @@ powershell -NoProfile -ExecutionPolicy Bypass -File "%ps1%" set "rc=%errorlevel%" echo PowerShell exited with RC=%rc% echo @"_CURRENT\_UpdateSequences.log" -echo( Done. Press any key to exit. -pause >nul +echo Done. exit /b %rc% \ No newline at end of file