以大写字母执行时脚本未运行 [英] script doesn't run while executing in clearcase

查看:93
本文介绍了以大写字母执行时脚本未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行以下构建脚本,并且未返回任何错误,但未在其中执行脚本.有一个具有以下名称的视图标签.用cleartool lsview <view-tag>可以看到.我可以执行cleartool setview <view-tag>,但它不会运行sh/abc/cds/fg/bin/ant -t all.

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

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

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

感谢您的帮助!

推荐答案

首先,不要使用setview.它会触发一个子shell,该子shell在脚本中无法很好地发挥作用.
请参阅" Python和ClearCase setview ",以获取有关在脚本生成过程中如何产生副作用的具体示例.

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.

使用cleartool startview <view-tag>确保已启动动态视图,然后使用完整的视图路径:

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/....

在您的情况下:

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

这篇关于以大写字母执行时脚本未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆