summaryrefslogtreecommitdiffstats
path: root/public/tools/myenlist.cmd
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /public/tools/myenlist.cmd
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'public/tools/myenlist.cmd')
-rw-r--r--public/tools/myenlist.cmd45
1 files changed, 45 insertions, 0 deletions
diff --git a/public/tools/myenlist.cmd b/public/tools/myenlist.cmd
new file mode 100644
index 000000000..67e284a45
--- /dev/null
+++ b/public/tools/myenlist.cmd
@@ -0,0 +1,45 @@
+@rem Script to enlist in all projects contained in %NTPROJECTS%.
+@rem Assumes tc.exe is in %Path%
+@rem __________________________________________________________________________
+
+@if "%_echo%"=="" echo off
+if not "%Verbose%"=="" echo on
+
+setlocal
+
+if "%1" == "" goto SetProjects
+for %%a in (./ .- .) do if ".%1." == "%%a?." goto Usage
+
+%_ntdrive%
+path=%path%;%_ntdrive%\nt\public\tools
+
+:TopOfProjectLoop
+ if "%1" == "" goto BreakOutOfProjectLoop
+ call projects %1 2>nul
+ if "%project%" == "" echo Don't know %1 project & goto BottomOfProjectLoop
+ tc junk %proj_path%
+ cd %proj_path%
+ if exist slm.ini echo Already enlisted in %1 project & goto BottomOfProjectLoop
+ enlist -fgs %slm_root% -p %project%
+ ssync -rfu
+
+:BottomOfProjectLoop
+ echo.
+ shift
+ goto TopOfProjectLoop
+
+:BreakOutOfProjectLoop
+
+goto End
+:SetProjects
+
+if not "%NTPROJECTS%" == "" call %0 %NTPROJECTS%
+
+goto End
+:Usage
+
+echo Usage: %0
+
+:End
+
+endlocal