standardize: read user input with [key] instead of <key>, [long input] instead of <INPUT>; echo path with [[path]]

This commit is contained in:
Luk Lu
2023-10-10 10:23:51 +08:00
parent c56fb5202f
commit 5253cac12b
26 changed files with 153 additions and 153 deletions

View File

@@ -10,7 +10,7 @@ set FONPATH3=%HOMEDRIVE%%HOMEPATH%\faronear
@ if not "" == "%1" (
set FONPATH=%1
) else (
echo *** Testing Path [%FONPATH1%] [%FONPATH2%] [%FONPATH3%]
echo *** Testing Path [[%FONPATH1%]] [[%FONPATH2%]] [[%FONPATH3%]]
if exist "%FONPATH1%" (
set FONPATH=%FONPATH1%
) else if exist "%FONPATH2%" (
@@ -20,37 +20,37 @@ set FONPATH3=%HOMEDRIVE%%HOMEPATH%\faronear
) else (
echo ××× none of the testing path is valid.
echo;
echo === Enter <fonpath> or leave <blank> for default to '.'
echo === Enter [start path]> or [leave blank] for default to [[%CD%]]
set /p FONPATH=">>> "
echo;
if "" == "%FONPATH%" (
set FONPATH=.
set FONPATH=%CD%
)
)
)
if not exist "%FONPATH%" (
echo ××× [%FONPATH%] not exist! Exit now. ***
echo ××× [[%FONPATH%]] not exist! Exit now. ***
@ GOTO END
) else (
echo √√√ FONPATH = %FONPATH%
echo √√√ FONPATH = [[%FONPATH%]]
)
pushd %FONPATH%
echo *** Starting from [%CD%] ***
echo *** Starting from [[%CD%]] ***
echo;
@ if "%2" == "hier" (
@REM for /d %%d in (*) do ( pushd %%d & ( for /d %%d in (*) do ( if exist %%d/.git pushd %%d & echo --- git pulling: %%d ... & git pull & popd ) ) & popd )
for /d %%o in (*) do (
@ if not "%%o" == ".vscode" (
echo ======== entering [%FONPATH%\%%o] ========
echo ======== entering [[%FONPATH%\%%o]] ========
echo;
pushd %%o
for /d %%g in (*) do (
if exist "%%g\.git" (
pushd %%g
echo ---- git pulling [%FONPATH%\%%o\%%g] ----
echo ---- git pulling [[%FONPATH%\%%o\%%g]] ----
git pull --all
echo;
popd
@@ -65,7 +65,7 @@ echo;
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
if exist "%%r\.git" (
pushd "%%r"
echo ---- git pulling [%%r] ----
echo ---- git pulling [[%%r]] ----
git pull --all
echo;
popd