On Wed 13 Sep 2006 at 02:34AM, Richard Lowe wrote:
>
> The results of a quick glance (at 2:30am, keep in mind):
>
> line 1356: CODEMGR_WS will be in the environment whenever you're
> bldenv'd in a workspace, and I don't see it otherwise unset
> in the lead-up to this, so this isn't an accurate check for
> TeamWare. It will be true in general (though other SCMs
> could put their checks before this, I suppose.)
>
> It's probably worth using the existence of $CODEMGR_WS/Codemgr_wsdata
> instead. Which should only be there in TeamWare workspaces.
Ahh, fair enough; I've revised detect_scm as follows:
| function detect_scm
| {
| #
| # If CODEMGR_WS is specified in the flist file, we assume teamware.
| #
| egrep '^CODEMGR_WS=' $FLIST > /dev/null 2>&1
| if [ $? = 0 ]; then
| echo "teamware"
| return
| fi
|
| #
| # The presence of $CODEMGR_WS and a valid-looking Codemgr_wsdata
| # file is our clue that this is a teamware workspace.
| #
| if [ ! -z "$CODEMGR_WS" -a -d "$CODEMGR_WS/Codemgr_wsdata" ]; then
| echo "teamware"
| else
| echo "unknown"
| fi
| }
Thanks,
-dp
--
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
tools-discuss mailing list
[email protected]