This commit is contained in:
陆柯 2022-10-24 12:27:25 +08:00
parent 439c4d6675
commit fcd08cd98e
8 changed files with 24 additions and 21 deletions

View File

@ -37,7 +37,7 @@ for /d %%o in (*) do (
@REM windows的链接文件会造成路径错误从而终止该循环从而导致下一轮乃至所有循环的工作目录错误。因此要过滤掉 .vscode 这个符号链接目录。 @REM windows的链接文件会造成路径错误从而终止该循环从而导致下一轮乃至所有循环的工作目录错误。因此要过滤掉 .vscode 这个符号链接目录。
if not "%%o" == ".vscode" ( if not "%%o" == ".vscode" (
@REM 如果同时使用了 GIT 和 云盘进行管理,每次 git pull 都会造成 .git 目录下某些文件变化,导致云盘不断自动同步。因此过滤掉云盘的目录不做更新。 @REM 如果同时使用了 GIT 和 云盘进行管理,每次 git pull 都会造成 .git 目录下某些文件变化,导致云盘不断自动同步。因此过滤掉云盘的目录不做更新。
@REM echo %%o | findstr "=" >NUL && ( @REM echo "%%o" | findstr "=" >NUL && (
@REM echo !!!!!!!! omitting [%FONPATH%\%%o] !!!!!!!! @REM echo !!!!!!!! omitting [%FONPATH%\%%o] !!!!!!!!
@REM echo; @REM echo;
@REM ) || ( @REM ) || (

View File

@ -32,14 +32,15 @@ echo *** Starting from [%CD%] ***
echo; echo;
for /d /r %%r in (*) do ( for /d /r %%r in (*) do (
@REM windows的链接文件会造成路径错误从而终止该循环从而导致下一轮乃至所有循环的工作目录错误。因此要过滤掉 .vscode 这个符号链接目录。 echo "%%r" | findstr "\.git" > NUL || (
if not "%%r" == ".vscode" ( echo "%%r" | findstr "node_modules" >NUL || (
if exist "%%r\.git" ( if exist "%%r\.git" (
pushd "%%r" pushd "%%r"
echo ---- git pulling [%FONPATH%\%%r] ---- echo ---- git pulling [%%r] ----
git pull --all git pull --all
echo; echo;
popd popd
)
) )
) )
) )

View File

@ -36,11 +36,11 @@ pushd $FONPATH
echo "*** Starting from [`pwd`] ***" echo "*** Starting from [`pwd`] ***"
echo "" echo ""
find . -mindepth 1 -maxdepth 3 -type d -name '?*' | grep -v 'node_modules' | while read repo find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -v 'node_modules' | while read repo
do do
if [ -d "$repo/.git" ] if [ -d "$repo/.git" ]
then then
echo "---- git pulling [`pwd`/$repo] ----" echo "---- git pulling [$repo] ----"
pushd "$repo" pushd "$repo"
git pull --all git pull --all
echo "" echo ""

View File

@ -44,7 +44,7 @@ for /d %%o in (*) do (
@REM windows的链接文件会造成路径错误从而终止该循环从而导致下一轮乃至所有循环的工作目录错误。因此要过滤掉 .vscode 这个符号链接目录。 @REM windows的链接文件会造成路径错误从而终止该循环从而导致下一轮乃至所有循环的工作目录错误。因此要过滤掉 .vscode 这个符号链接目录。
if not "%%o" == ".vscode" ( if not "%%o" == ".vscode" (
@REM 如果同时使用了 GIT 和 云盘进行管理,每次 git push 都会造成 .git 目录下某些文件变化,导致云盘不断自动同步。因此过滤掉云盘的目录不做更新。 @REM 如果同时使用了 GIT 和 云盘进行管理,每次 git push 都会造成 .git 目录下某些文件变化,导致云盘不断自动同步。因此过滤掉云盘的目录不做更新。
@REM echo %%o | findstr "=" >NUL && ( @REM echo "%%o" | findstr "=" >NUL && (
@REM echo !!!!!!!! omitting [%FONPATH%\%%o] !!!!!!!! @REM echo !!!!!!!! omitting [%FONPATH%\%%o] !!!!!!!!
@REM echo; @REM echo;
@REM ) || ( @REM ) || (
@ -54,7 +54,7 @@ for /d %%o in (*) do (
for /d %%g in (*) do ( for /d %%g in (*) do (
if exist %%g\.git ( if exist %%g\.git (
pushd %%g pushd %%g
echo ---- git add-commit-push [%FONPATH%\%%o\%%g] ---- echo ---- git commit and push [%FONPATH%\%%o\%%g] ----
git add . && git commit -m "%COMMIT_MESSAGE%" && git push git add . && git commit -m "%COMMIT_MESSAGE%" && git push
echo; echo;
popd popd

View File

@ -44,11 +44,11 @@ then
fi fi
echo "" echo ""
find . -mindepth 1 -maxdepth 3 -type d -name '?*' | grep -v 'node_modules' | while read repo find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -v 'node_modules' | while read repo
do do
if [ -d "$repo/.git" ] if [ -d "$repo/.git" ]
then then
echo "---- git commit & push [`pwd`/$repo] ----" echo "---- git commit & push [$repo] ----"
pushd "$repo" pushd "$repo"
git add . && git commit -m "$COMMIT_MESSAGE" && git push git add . && git commit -m "$COMMIT_MESSAGE" && git push
echo "" echo ""

View File

@ -35,7 +35,7 @@ echo;
for /d %%o in (*) do ( for /d %%o in (*) do (
@ if not "%%o" == ".vscode" ( @ if not "%%o" == ".vscode" (
@REM @ echo %%o | findstr "=" >NUL && ( @REM @ echo "%%o" | findstr "=" >NUL && (
@REM echo !!!!!!!! omitting [%FONPATH%\%%o] !!!!!!!! @REM echo !!!!!!!! omitting [%FONPATH%\%%o] !!!!!!!!
@REM echo; @REM echo;
@REM ) || ( @REM ) || (

View File

@ -32,8 +32,7 @@ echo *** Starting from [%CD%] ***
echo; echo;
for /d /r %%r in (*) do ( for /d /r %%r in (*) do (
@REM windows的链接文件会造成路径错误从而终止该循环从而导致下一轮乃至所有循环的工作目录错误。因此要过滤掉 .vscode 这个符号链接目录。 echo "%%r" | findstr "node_modules" >NUL || (
if not "%%r" == ".vscode" (
if exist "%%r\package.json" ( if exist "%%r\package.json" (
findstr "\"boot\"" "%%r\package.json" >NUL && ( findstr "\"boot\"" "%%r\package.json" >NUL && (
pushd %%r pushd %%r

View File

@ -36,14 +36,17 @@ pushd $FONPATH
echo "*** Starting from [`pwd`] ***" echo "*** Starting from [`pwd`] ***"
echo "" echo ""
find . -mindepth 1 -maxdepth 3 -type d -name '?*' | grep -v 'node_modules' | while read repo find . -mindepth 1 -maxdepth 3 -type d -name '[^.]*' | grep -v 'node_modules' | while read repo
do do
if ( [ -f "$repo/package.json" ] && grep -q '"boot"' "$repo/package.json" ) if ( [ -f "$repo/package.json" ] && grep -q '"boot"' "$repo/package.json" )
then then
echo "---- npm booting: [`pwd`/$repo] ----" echo ""
echo "---- npm booting: [$repo] ----"
echo ""
pushd "$repo" pushd "$repo"
npm run boot npm run boot
echo "---- npm booted: [`pwd`/$repo] ----" echo ""
echo "---- npm booted: [$repo] ----"
echo "" echo ""
popd popd
fi fi