script doesn't run while executing in clearcase

一个人想着一个人 提交于 2019-12-01 08:45:13

问题


I am trying to execute the following build script and it is returning no error but it is not executing the script inside it. there is a view tag with the following name. it can be seen with cleartool lsview <view-tag>. I can do cleartool setview <view-tag> but it doesn't run the sh /abc/cds/fg/bin/ant -t all.

CLEARCASE_VIEWNAME=NYC_CYN

cleartool setview -exec "newgrp orange; cd /abc/cds/fg/bin; sh /abc/cds/fg/bin/ant -t all -i ' '" $CLEARCASE_VIEWNAME

Thanks for any help !!


回答1:


First, don't use setview. It triggers a sub-shell, which doesn't play well with scripts.
See "Python and ClearCase setview" for a concrete example on how spawning a process has side effects when it comes to scripts.

Use cleartool startview <view-tag> to make sure your dynamic view is started, and then use the full view path:

/view/<view-tag>/vobs/YourVobs/....

In your case:

newgrp orange; 
cd /view/<view-tag>/vobs/abc/cds/fg/bin
sh /view/<view-tag>/vobs/abc/cds/fg/bin/ant -t all -i ' '


来源:https://stackoverflow.com/questions/22736288/script-doesnt-run-while-executing-in-clearcase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!