BlPackage - addExternalCmdToEnd

BlPackage - addExternalCmdToEnd

Description :

This command adds an external command to the end 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.

This file must be a text file with the list of commands that will be added to the external command. For example, if you want to run /bin/ls, create a text file containing the /bin/ls command and provide this text file as the argument to the BLCLI call.

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 end 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 addExternalCmdToEnd $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 addExternalCmdToEnd $PACKAGE_DBKEY sampleExternalCmd //myRemoteServer/c/temp/cmd.txt //myRemoteServer/c/temp/undocmd.txt "Abort"` 



Was this page helpful? Yes No Submitting... Thank you

Comments