mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-25 21:46:43 +01:00
Added scripts for ClearCase
This commit is contained in:
parent
fdebfc51dc
commit
f9a8cd676c
6
Scripts/cc_find_changes.bat
Normal file
6
Scripts/cc_find_changes.bat
Normal file
@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
:: redirect stdout to stderr, so the login will be visible in console even if stdout was piped to a file
|
||||
CALL rcleartool login 1>&2
|
||||
echo Searching for modified files in %CD%... 1>&2
|
||||
:: pipe the rcleartool output to the powershell script with the same name as this file
|
||||
rcleartool lsco -cview -r | Powershell -executionpolicy unrestricted -File "%~dpn0.ps1"
|
104
Scripts/cc_transfer_mastership.bat
Normal file
104
Scripts/cc_transfer_mastership.bat
Normal file
@ -0,0 +1,104 @@
|
||||
@echo off
|
||||
REM Turn echoing off and don't show echo off command
|
||||
REM
|
||||
cls
|
||||
echo.
|
||||
echo.
|
||||
echo *******************************************
|
||||
echo * CearCase ATCSim Kaufbeuren *
|
||||
echo * Transfer Mastership *
|
||||
echo *******************************************
|
||||
echo.
|
||||
echo.
|
||||
|
||||
REM See if this script was run from GUI or command line.
|
||||
REM cmdcmdline will contain the script name if called from
|
||||
REM gui. If from gui, go to GUI, otherwise, go to cmd_line
|
||||
REM
|
||||
set interactive=1
|
||||
echo %cmdcmdline% | find /i "%~0" >nul
|
||||
if not errorlevel 1 set interactive=0
|
||||
if %interactive%==0 (goto gui) else (goto cmd_line)
|
||||
|
||||
REM ################ Called from Command Line #############################
|
||||
|
||||
:cmd_line
|
||||
|
||||
set _exitStatus=0
|
||||
set _argcActual=0
|
||||
set _argcExpected=3
|
||||
|
||||
REM # See if there are 3 arguments as expected; If not, call ShowUsage
|
||||
REM # and exit script, otherwise, rsh to CC server and execute transfer script
|
||||
REM #
|
||||
for %%i in (%*) do set /A _argcActual+=1
|
||||
|
||||
if %_argcActual% NEQ %_argcExpected% (
|
||||
|
||||
call :_ShowUsage %0%
|
||||
|
||||
set _exitStatus=1
|
||||
|
||||
goto:_EOF
|
||||
)
|
||||
|
||||
rsh 192.168.100.12 -l root /usr/bin/transfer_mastership.sh %1 %2 %3
|
||||
goto:_EOF
|
||||
|
||||
REM ################ Called from GUI #############################
|
||||
|
||||
:gui
|
||||
echo.
|
||||
echo.
|
||||
echo *******************************************
|
||||
echo * Transfer Mastership *
|
||||
echo *******************************************
|
||||
echo * Destination = ufa | atcsim | kb | scott *
|
||||
echo *******************************************
|
||||
echo.
|
||||
echo.
|
||||
pause
|
||||
REM #
|
||||
REM # THis script executed via GUI, prompt for the arguments
|
||||
REM # and rsh to beluga and execute transfer script
|
||||
REM # Make user hit "return" when script finishes so he
|
||||
REM # can see results of transfer mastership script.
|
||||
REM #
|
||||
set /p branch="Enter Branch --> "
|
||||
set /p vob="Enter Vob --> "
|
||||
set /p destination="Enter Destination --> "
|
||||
rsh 192.168.100.12 -l root /usr/bin/transfer_mastership.sh %branch% %vob% %destination%
|
||||
echo.
|
||||
set /p the_end="Hit enter to exit "
|
||||
goto:_EOF
|
||||
|
||||
REM ##############################################################
|
||||
|
||||
|
||||
|
||||
|
||||
:_ShowUsage
|
||||
|
||||
echo.
|
||||
echo [USAGE]: %~1 BRANCH VOB DESTINATION
|
||||
echo.
|
||||
echo [USAGE]: VOB = attower, ateditor, ...
|
||||
echo [USAGE]: DESTINATION = kb, atcsim, ufa
|
||||
echo.
|
||||
|
||||
if NOT "%~2" == "" (
|
||||
|
||||
echo %~2
|
||||
|
||||
echo.
|
||||
)
|
||||
|
||||
goto:eof
|
||||
|
||||
:_EOF
|
||||
|
||||
|
||||
echo.
|
||||
|
||||
cmd /c exit %_exitStatus%
|
||||
|
Loading…
Reference in New Issue
Block a user