26 lines
No EOL
825 B
Bash
Executable file
26 lines
No EOL
825 B
Bash
Executable file
#!/usr/bin bash
|
|
|
|
|
|
function compile_default_plugins() {
|
|
makeshift_exe=./makeshift
|
|
go_exe=go
|
|
|
|
# make sure go build tools are installed
|
|
if command -v $go_exe >/dev/null 2>&1; then
|
|
# make sure that MAKESHIFT_ROOT is set
|
|
if [[ ! -v MAKESHIFT_ROOT ]]; then
|
|
# Compile the default external plugins
|
|
go build
|
|
$makeshift_exe compile pkg/plugins/jinja2/jinja2.go -o $MAKESHIFT_ROOT/plugins/jinja2.go
|
|
$makeshift_exe compile pkg/plugins/smd/smd.go -o $MAKESHIFT_ROOT/plugins/smd.so
|
|
$makeshift_exe compile pkg/plugins/userdata/userdata.go -o $MAKESHIFT_ROOT/plugins/userdata.go
|
|
else
|
|
echo "requires MAKESHIFT_ROOT to be set"
|
|
fi
|
|
else
|
|
echo "Go build tools must be installed"
|
|
fi
|
|
}
|
|
|
|
|
|
compile_default_plugins |