ScriptModel - ODEX-TOS/tos-installer-backend GitHub Wiki
A script is a custom shell script that can be executed during the installation.
A script model looks like the following
models:
- scripts:
- script:
name: "script1"
file: "test.sh"
command: "echo hello world"
You define your script in a scripts
array. Each script must have a name
parameter. If none is supplied you can't call that script.
A script can either have a file
or command
attribute.
The file
attribute will execute a shell script located in a file in the above case test.sh
. This can be any path or file
If no file is provided than you need to specify the command
property. This is a simple command or series of commands to execute.
You can also have a multiline command as such
- scripts:
- script:
name: "script1"
command: |
echo "this is"
echo "a multiline command"
If you want multiple script do the following
- scripts:
- script:
name: "script1"
command: "echo first script"
- script:
name: "script2"
file: "script2.sh"
If you wish to use this model add script: name
as a build step in the execution array. Where name is the name of your script