1 Star 0 Fork 69

何阳/neuron

forked from EMQX/neuron 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
package-sdk.sh 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
eeff 提交于 2023-01-16 14:13 . ci: package monitor plugin in sdk
#!/bin/bash
arch=x86_64-linux-gnu
package_name=neuron-sdk
function usage() {
echo "Usage: $0 "
echo "-n package name [default: ${package_name}]"
echo "-p target platform compiler prefix (opts: x86_64-linux-gnu, arm-linux-gnueabihf, aarch64-linux-gnu, ...)[default: x86_64-linux-gnu]"
}
while getopts "p:n:h-:" OPT; do
case ${OPT} in
p)
arch=$OPTARG
;;
n)
package_name=$OPTARG
;;
h)
usage
exit 0
;;
\?)
usage
exit 1
;;
esac
done
rm -rf ${package_name}/*
mkdir -p $package_name/include/neuron/
mkdir -p $package_name/lib
mkdir -p $package_name/config
mkdir -p $package_name/plugins/schema
cp sdk-install.sh ${package_name}/
cp neuron.conf ${package_name}/
cp cmake/neuron-config.cmake ${package_name}/
cp -r include/* ${package_name}/include/
cp -r build/dist ${package_name}/
cp build/neuron ${package_name}
cp build/libneuron-base.so ${package_name}/lib
cp /usr/local/lib/libzlog.so.1.2 ${package_name}/lib
cp persistence/*.sql ${package_name}/config/
cp sdk-zlog.conf ${package_name}/config/
cp zlog.conf ${package_name}/config/
cp dev.conf ${package_name}/config/
cp neuron.key ${package_name}/config/
cp neuron.pem ${package_name}/config/
cp default_plugins.json ${package_name}/config/
cp build/plugins/schema/ekuiper.json \
build/plugins/schema/monitor.json \
build/plugins/schema/mqtt.json \
build/plugins/schema/modbus-tcp.json \
build/plugins/schema/file.json \
${package_name}/plugins/schema/
cp build/plugins/libplugin-ekuiper.so \
build/plugins/libplugin-monitor.so \
build/plugins/libplugin-mqtt.so \
build/plugins/libplugin-modbus-tcp.so \
build/plugins/libplugin-file.so \
${package_name}/plugins/
tar czf ${package_name}-${arch}.tar.gz ${package_name}/
ls ${package_name}
rm -rf ${package_name}
echo "${package_name}-${arch}.tar.gz"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/albb0608/neuron.git
git@gitee.com:albb0608/neuron.git
albb0608
neuron
neuron
main

搜索帮助