【发布时间】:2010-08-26 19:23:38
【问题描述】:
我在 Hudson 有一份基于 Windows XP 从属设备的工作。我知道符号链接在 Windows XP 中是不可能的(直接),所以我试图使用联结。我写了一个批处理脚本:
@echo off
if "%1" == "" goto ERROR1
if "%2" == "" goto ERROR2
goto create
:create
echo Creating junction for %1 at %2
if exist %2 junction -q -d %2
md %2
junction -q %2 %1
goto :eof
:ERROR1
echo Source directory not specified
goto :eof
:ERROR2
echo Destination directory not specified
goto :eof
在我的工作中,当我调用这个脚本时,它挂在echo Creating junction for %1 at %2 行。这是我的 Hudson“执行 Windows 批处理命令”:
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
copy C:\Data\Scripts\slink.bat .
call slink.bat C:\Data\3rdParty64 3rdParty
call slink.bat %WORKSPACE%\..\..\..\tds.core\label\%label% tds.core
...这是输出:
C:\Data\Hudson\dev\workspace\Common_Windows\label\DFWW9202>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
Setting environment for using Microsoft Visual Studio 2010 x64 tools.
1 file(s) copied.
Creating junction for C:\Data\3rdParty64 at 3rdParty
有什么想法吗? (如果这不是正确的网站,请重定向..对不起,谢谢!)
【问题讨论】:
标签: command-line windows-xp continuous-integration hudson batch-file