cotopboy
9/16/2013 - 8:08 AM

working with multiple project together

working with multiple project together

@echo off
cls

REM *** only for WinVista / Win7
REM *** (R. Dierck - 2013-03-21)

REM ******************************************************
set "BundleName=LabMap+Bundles+smart_metering"
set "SandboxFolder=E:\p4_sandbox\dierck"
REM ******************************************************

echo.
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo Use with care! - This script could destroy your projects
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo.
echo Press any key to continue...!
pause > NUL

echo.
echo *** Patching ... ***

echo.
echo substitution directory 'K:'
echo -------------------------------------------------------------
IF EXIST K:\NUL (
  subst k: /D
	echo removed k:
)
subst k: "%SandboxFolder%\%BundleName%"
echo created k:
echo -------------------------------------------------------------

echo.
echo Create symbolic links
echo -------------------------------------------------------------
call :Patch Frameworks+vs_cpp
call :Patch LabMap+Interfaces+efr
call :Patch LabMap+Interfaces+mbus
call :Patch LabMap+Interfaces+smartmeter
call :Patch SmartMetering+Hardware+mbusapi
call :Patch smpc
call :Patch LabMap+Interfaces+landis_and_gyr
echo -------------------------------------------------------------

echo.
echo *** finished! ***
echo.
echo Press any key!
pause > NUL
goto:eof

:Patch
rmdir /S /Q "k:\%1"
mklink /J "k:\%1" "%SandboxFolder%\%1\%1"
goto:eof