bbfdm/gitlab-ci/install-dependencies.sh
Vivek Kumar Dutta 63fad00eee Multiple improvements
- New input daemon option, 'service_name' to easily configure micro-service
- service_name used with 'dm_' prefix in process name
- service_name with 'dm_' prefix and '_inst' suffix for forked instance updater
- Unified signal handler for micro-service and main process
- Cli argument '-m' overloaded to support module name in place of plugin path
- Test alignments and improvements
2024-04-15 13:46:49 +00:00

32 lines
815 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
[ ! -d "${BBFDM_PLUGIN_DIR}" ] && mkdir -p "${BBFDM_PLUGIN_DIR}"
rm -f ${BBFDM_PLUGIN_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 > /tmp/plugin_input.json
# Install datamodel plugins
./tools/generate_dm.py /tmp/plugin_input.json
check_ret $?
ls -l /usr/share/bbfdm/plugins/
fi