<div dir="ltr"><div><br></div><div>Below is a bash script that uses expect to automate the cvs login for checkouts of kitware packages. There are several environment variables used to specify release tags.</div><div><br></div>
<div>------------------------------------------------------------------------------</div><br><div><div>#!/bin/bash</div><div><br></div><div># Check the kitware web sites to update these release tags</div><div>CMAKE_tag="CMake-2-6-1"</div>
<div>ITK_tag="ITK-3-8"</div><div>VTK_tag="VTK-5-2"</div><div>PARAVIEW_tag="ParaView-3-2-3"</div><div>KWWIDGETS_tag="DNow"</div><div><br></div><div>mkdir -p ~/src/kitware</div><div>cd ~/src/kitware</div>
<div><br></div><div><br></div><div>expect -c "</div><div>spawn cvs -d :pserver:anonymous@www.cmake.org:/cvsroot/CMake login;</div><div>expect \"CVS password:\";</div><div>send \"cmake\r\";</div><div>
send_user \"\r\nDone CVS login\r\n\";</div><div>exit"</div><div>cvs -d :pserver:anonymous@www.cmake.org:/cvsroot/CMake co -r $CMAKE_tag CMake</div><div><br></div><div><br></div><div>expect -c "</div><div>
spawn cvs -d :pserver:anonymous@www.itk.org:/cvsroot/Insight login;</div><div>expect \"CVS password:\";</div><div>send \"insight\r\";</div><div>send_user \"\r\nDone CVS login\r\n\";</div><div>
exit"</div><div>cvs -d :pserver:anonymous@www.itk.org:/cvsroot/Insight co -r $ITK_tag Insight</div><div>cvs -d :pserver:anonymous@www.itk.org:/cvsroot/Insight co -r $ITK_tag InsightDocuments</div><div>cvs -d :pserver:anonymous@www.itk.org:/cvsroot/Insight co -r $ITK_tag InsightApplications</div>
<div><br></div><div><br></div><div>expect -c "</div><div>spawn cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTK login;</div><div>expect \"CVS password:\";</div><div>send \"vtk\r\";</div><div>
send_user \"\r\nDone CVS login\r\n\";</div><div>exit"</div><div>cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTK co -r $VTK_tag VTK</div><div>expect -c "</div><div>spawn cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTKData login;</div>
<div>expect \"CVS password:\";</div><div>send \"vtk\r\";</div><div>send_user \"\r\nDone CVS login\r\n\";</div><div>exit"</div><div>cvs -d :pserver:anonymous@public.kitware.com:/cvsroot/VTKData co -r $VTK_tag VTKData</div>
<div><br></div><div><br></div><div>expect -c "</div><div>spawn cvs -d :pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 login;</div><div>expect \"CVS password:\";</div><div>send \"\r\";</div><div>
send_user \"\r\nDone CVS login\r\n\";</div><div>exit"</div><div>cvs -d :pserver:anoncvs@www.paraview.org:/cvsroot/ParaView3 co -r $PARAVIEW_tag ParaView3</div><div><br></div><div>expect -c "</div><div>
spawn cvs -d :pserver:anoncvs@www.kwwidgets.org:/cvsroot/KWWidgets login;</div><div>expect \"CVS password:\";</div><div>send \"\r\";</div><div>send_user \"\r\nDone CVS login\r\n\";</div><div>
exit"</div><div>#cvs -d :pserver:anoncvs@www.kwwidgets.org:/cvsroot/KWWidgets co -r $KWWIDGETS_tag KWWidgets</div><div>cvs -d :pserver:anoncvs@www.kwwidgets.org:/cvsroot/KWWidgets co KWWidgets</div><div><br></div></div>
</div>