zeek/auxil/broker/cmake/zeek-plugin-install-package.sh
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

24 lines
506 B
Bash
Executable File

#! /bin/sh
#
# Helper script to install the tarball with a plugin's binary distribution.
#
# Called from ZeekPluginDynamic.cmake. Current directory is the plugin
# build directory.
if [ $# != 2 ]; then
echo "usage: $(basename $0) <canonical plugin name> <destination directory>"
exit 1
fi
dst=$2
if [ ! -d "${dst}" ]; then
echo "Warning: ${dst} does not exist; has Zeek been installed?"
mkdir -p ${dst}
fi
name=$1
tgz=$(pwd)/$name.tgz
(cd ${dst} && rm -rf "${name}" && tar xzf ${tgz})