feat: added compile-plugins.sh script
This commit is contained in:
parent
ebb95a29ec
commit
d88ab2c01f
2 changed files with 26 additions and 0 deletions
26
bin/compile-plugins.sh
Normal file
26
bin/compile-plugins.sh
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue