[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference smurf::buildhelp

Title:USG buildhelp questions/answers
Moderator:SMURF::FILTER
Created:Mon Apr 26 1993
Last Modified:Mon Jan 20 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2763
Total number of notes:5802

2177.0. "Do you know how to tell in a script if you re currently in a workon environment" by AOSG::FILTER (Automatic Posting Software - mail to flume::puck) Wed Mar 27 1996 21:54

Date Of Receipt: 	27-MAR-1996 17:49:08.65
From: 	SMURF::GURU::kucherov "sergei kucherov  27-Mar-1996 1744"
To: 	odehelp@dec:.zko.guru
CC: 	kucherov@dec:.zko.guru
Subj: 	Do you know how to tell in a script if you're currently in a workon  environment

Do you know how to tell in a shell script if you're currently in a workon
environment?

I tried "workon", "workon -list", "workon -info", "currentsb", "sbinfo"
and in each case I can't tell from the output whether I'm in a workon
or not. This is not a problem interactively (since my prompt changes
in a workon), but from a script I'd like to be able to know if the user
is currently in some workon environment.

	Thanks ode gurus,
	sergei

T.RTitleUserPersonal
Name
DateLines
2177.1Re: Do you know how to tell in a script if you re currently in a workon environmentAOSG::FILTERAutomatic Posting Software - mail to flume::puckWed Mar 27 1996 21:5513
Date Of Receipt: 	27-MAR-1996 18:01:21.99
From: 	SMURF::FLUME::"davidson@sean.zk3.dec.com"
To: 	kucherov@zk3.dec.com
CC: 	odehelp@zk3.dec.com
Subj: 	Re: Do you know how to tell in a script if you're currently in a workon  environment

The simplest way to tell if you are in a workon is by checking the environment
variable WORKON.  You can additional environment variable checks by testing
SOURCEBASE and PROJECT_NAME.  srequest checks all three of these before it
tries to do any ode commands.

Sean

2177.2Re: Do you know how to tell in a script if you re currently in a workon environmentAOSG::FILTERAutomatic Posting Software - mail to flume::puckWed Mar 27 1996 22:5611
Date Of Receipt: 	27-MAR-1996 18:55:39.88
From: 	SMURF::GURU::kucherov "sergei kucherov  27-Mar-1996 1849"
To: 	D. Sean Davidson <davidson@sean.zk3.dec.com>
CC: 	kucherov@dec:.zko.guru, odehelp@dec:.zko.guru
Subj: 	Re: Do you know how to tell in a script if you're currently in a workon  environment

Thanks!
I'll put that check into my script now.

	sergei