Bash

class Bash : CmdLang

Bash implementation of CmdLang.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
class FileBased(getGraderLogPath: () -> Path) : CmdOutputHandler

File-based implementation of command line output handler, in which every variable's result is stored as a file.

Properties

Link copied to clipboard
open override val DEFAULT_EXITCODE: Int

Default exitcode of a variable if stage execution timed out.

Link copied to clipboard
open override val hereDoc: CmdLang.HereDoc

Heredoc with certain delimiters under this CmdLang.

Functions

Link copied to clipboard
open override fun catFile(path: String): String

Read-out file into stdout

Link copied to clipboard
open override fun deref(variable: String): String

Interpret the variable if it is defined the command line environment by dereferencing.

Link copied to clipboard
open override fun exitCmd(exitcode: String): String

Command for exiting with a given exitcode integer or expression.

Link copied to clipboard
open override fun expand(cmd: String): String

Expand and interpret the command expression in the shell, so that it can be used to construct further commands by substituting.

Link copied to clipboard
open override fun <T> from(result: CmdUtils.Var.Result<T>): String

Command building combinators to pipe contents from previously saved Var.baseName's stdout/stderr.

Link copied to clipboard
open override fun makeHeredoc(content: String): String

Command building combinator to make heredocs normally. Usually to be registed into a Var or piped into other commands.

Link copied to clipboard
open override fun makePipedHeredoc(content: String, pipeToCmd: String): String

Command building combinator to make heredocs and then have a command to pipe the heredoc into. Usually to be registed into a Var or piped into other commands.

Link copied to clipboard
open override fun print(content: String): String

Command to print content into the console.

Link copied to clipboard
open operator fun String.rangeTo(rest: String): String

Command building combinator to concat different parts of the command with proper spacing.