universe/commit.cmd

20 lines
308 B
Batchfile
Raw Normal View History

2022-02-03 21:13:20 +00:00
@echo off
2022-02-04 01:08:54 +00:00
set BASE=%CD%
for /R /D %%G in (*) do if exist %%G\.git (
2022-02-03 21:13:20 +00:00
cd %%G
set RESULT=
for /f %%i in ('git status -s') do (set RESULT=%%i)
if defined RESULT (
2022-02-04 01:09:08 +00:00
git add .
2022-02-03 21:13:20 +00:00
git commit %*
2022-02-03 21:17:27 +00:00
set ANY=1
2022-02-03 21:13:20 +00:00
)
2022-02-04 01:08:54 +00:00
cd %BASE%
2022-02-03 21:13:20 +00:00
)
2022-02-03 21:17:27 +00:00
if defined ANY (
git add .
git commit %*
)