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 这个符号链接目录。
if not "%%o" == ".vscode" (
@REM 如果同时使用了 GIT 和 云盘进行管理,每次 git pull 都会造成 .git 目录下某些文件变化,导致云盘不断自动同步。因此过滤掉云盘的目录不做更新。
@REM echo %%o | findstr "=" >NUL && (
@REM echo "%%o" | findstr "=" >NUL && (
@REM echo !!!!!!!! omitting [%FONPATH%\%%o] !!!!!!!!
@REM echo;
@REM ) || (

View File

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

View File

@ -36,11 +36,11 @@ pushd $FONPATH
echo "*** Starting from [`pwd`] ***"
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
if [ -d "$repo/.git" ]
then
echo "---- git pulling [`pwd`/$repo] ----"
echo "---- git pulling [$repo] ----"
pushd "$repo"
git pull --all
echo ""

View File

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

View File

@ -44,11 +44,11 @@ then
fi
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
if [ -d "$repo/.git" ]
then
echo "---- git commit & push [`pwd`/$repo] ----"
echo "---- git commit & push [$repo] ----"
pushd "$repo"
git add . && git commit -m "$COMMIT_MESSAGE" && git push
echo ""

View File

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

View File

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

View File

@ -36,14 +36,17 @@ pushd $FONPATH
echo "*** Starting from [`pwd`] ***"
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
if ( [ -f "$repo/package.json" ] && grep -q '"boot"' "$repo/package.json" )
then
echo "---- npm booting: [`pwd`/$repo] ----"
echo ""
echo "---- npm booting: [$repo] ----"
echo ""
pushd "$repo"
npm run boot
echo "---- npm booted: [`pwd`/$repo] ----"
echo ""
echo "---- npm booted: [$repo] ----"
echo ""
popd
fi