1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#! /bin/sh
#
# Helper script to install the tarball with a plugin's binary distribution.
#
# Called from BroPluginDynamic.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 "Error: ${dst} does not exist; has Bro been installed?"
exit 1
fi
name=$1
tgz=`pwd`/$name.tgz
( cd ${dst} && rm -rf "${name}" && tar xzf ${tgz} )
|