mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
33 lines
805 B
Bash
Executable file
33 lines
805 B
Bash
Executable file
#!/bin/bash
|
|
|
|
echo "install dependencies of bbf"
|
|
|
|
source ./gitlab-ci/shared.sh
|
|
|
|
# install required packages
|
|
exec_cmd apt update
|
|
exec_cmd apt install -y python3-pip iproute2 jq
|
|
exec_cmd pip3 install pexpect ubus xlwt
|
|
|
|
# Make sure that all plugins are removed
|
|
repo_dir="/etc/bbfdm/plugins"
|
|
[ ! -d "${repo_dir}" ] && mkdir -p "${repo_dir}"
|
|
rm -f ${repo_dir}/*
|
|
|
|
# compile and install libbbf
|
|
install_libbbf ${1}
|
|
|
|
#compile and install libbbf_test dynamic extension library
|
|
install_libbbf_test ${1}
|
|
|
|
# Install datamodel plugins/micro-service only when pipeline trigger for bbfdm
|
|
if [ -z "${1}" ]; then
|
|
# Generate plugin_input.json
|
|
jq 'del(.output)' tools/tools_input.json > plugin_input.json
|
|
|
|
# Install datamodel plugins
|
|
./tools/generate_dm.py plugin_input.json
|
|
check_ret $?
|
|
|
|
ls -l /etc/bbfdm/plugins/
|
|
fi
|