rename FONPATH to ROOTPATH; add git-ignore-find2copy.sh

This commit is contained in:
Luk
2024-01-28 09:50:54 +08:00
parent d016571ff5
commit 304d2564fa
18 changed files with 380 additions and 329 deletions

View File

@@ -1,37 +1,37 @@
@echo off
@REM 首先清除可能残留的变量
set FONPATH=
set ROOTPATH=
@ if not "" == "%1" (
set FONPATH=%1
set ROOTPATH=%1
) else (
if exist D:\faronear (
set FONPATH=D:\faronear
set ROOTPATH=D:\faronear
) else (if exist C:\faronear (
set FONPATH=C:\faronear
set ROOTPATH=C:\faronear
) else (if exist %HOMEDRIVE%%HOMEPATH%\faronear (
set FONPATH=%HOMEDRIVE%%HOMEPATH%\faronear
set ROOTPATH=%HOMEDRIVE%%HOMEPATH%\faronear
) else (
echo ××× none of the testing path is valid.
echo;
echo === Enter [start path] or [leave blank] for default to [[%CD%]]
set /p FONPATH=">>> "
set /p ROOTPATH=">>> "
echo;
if "" == "%FONPATH%" (
set FONPATH=%CD%
if "" == "%ROOTPATH%" (
set ROOTPATH=%CD%
)
)))
)
if not exist "%FONPATH%" (
echo ××× [[%FONPATH%]] not exist! Exit now. ***
if not exist "%ROOTPATH%" (
echo ××× [[%ROOTPATH%]] not exist! Exit now. ***
@ GOTO END
) else (
echo √√√ FONPATH = [[%FONPATH%]]
echo √√√ ROOTPATH = [[%ROOTPATH%]]
)
pushd %FONPATH%
pushd %ROOTPATH%
echo *** Starting from [[%CD%]] ***
echo;
@@ -40,7 +40,7 @@ for /d /r %%r in (*) do (
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
if exist "%%r\node_modules" (
pushd "%%r"
echo ---- Deleting [[%FONPATH%\%%r]] ----
echo ---- Deleting [[%ROOTPATH%\%%r]] ----
rd /s /q node_modules
echo;
popd