File: bro-plugin-install-package.sh

package info (click to toggle)
broccoli-python 0.62-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 460 kB
  • ctags: 105
  • sloc: python: 407; sh: 202; makefile: 21
file content (23 lines) | stat: -rwxr-xr-x 504 bytes parent folder | download | duplicates (9)
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 "Warning: ${dst} does not exist; has Bro been installed?"
    mkdir -p ${dst}
fi

name=$1
tgz=`pwd`/$name.tgz

( cd ${dst} && rm -rf "${name}" && tar xzf ${tgz} )