BlPackage - addExternalCmdToStart


BlPackage - addExternalCmdToStart

Description :

This command adds an external command to the start of a BLPackage.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

pkgDBKey

DBKey

Handle to the BLPackage.

ecmdName

String

Name of the external command.

cmdFile

String

Cmd script file for the external command. This file can be on a local or remote server.

undoCmdFile

String

UndoCmd script file for the external command. This file can be on a local or remote server.

actFailure

String

Action on failure for the external command (Ignore, Continue, or Abort).

Examples :

Example

The following example adds an external command with name sampleExternalCmd to the start of a BLPackage. The content of the command is from C:/temp/cmd.txt and the content of the undo command is from C:/temp/undocmd.txt. The external command aborts on failure.

Script


# Depot folder in which the BLPackage is stored.

PACKAGE_GROUP="/parent/group1"

# Name of the BLPackage.

PACKAGE_NAME="blpgk1"

PACKAGE_DBKEY=`blcli BlPackage getDBKeyByGroupAndName $PACKAGE_GROUP $PACKAGE_NAME`

RESULT=`blcli BlPackage addExternalCmdToStart $PACKAGE_DBKEY sampleExternalCmd /c/temp/cmd.txt /c/temp/undocmd.txt "Abort"`



Example

The following example shows how to specify a remote command file. The file is located on a server with the hostname myRemoteServer.

Script


RESULT=`blcli BlPackage addExternalCmdToStart $PACKAGE_DBKEY sampleExternalCmd //myRemoteServer/c/temp/cmd.txt //myRemoteServer/c/temp/undocmd.txt "Abort"`



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*