Jump to content

shell script to ensure a workspace exists or create it


epeleg

Recommended Posts

I would like to create a shell script that creates a workspace but does not fail if this workspace already exists.

but I can seem to find a good reference for this like what will 'cm mkwk' return for an existing workspace.
or how can i just check if a workspace exists and workflow based on that....

 

any help or pointers would be appreciated.
 

Link to comment
Share on other sites

Hi!

 

you have several options.

 

1) Check if the path where you're trying to create the new workspace is returned in the "cm lwk" command.

2) Check if a hidden ".plastic" directory is placed where you are trying to create the new workspace.

3) The "cm ls" for the new workspace path will tell you scm info if a workspace already exists, if not just a "XX is not in a workspace"

4) The "cm wi" command will tell you "XX is not in a workspace" is a workspace doesn't exist.

 

Hope it helps.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...