suricata/scripts/check-setup.sh
Danny Browning ac37fd5e29 tools: bash from env
Use of hardcoded bash prevents users from using an upgraded bash which may
live in a different location. This behavior is often seen on OSX systems.

Utilize env to find the preferred bash to call for scripts.
2020-11-17 14:06:37 +01:00

36 lines
695 B
Bash
Executable file

#!/usr/bin/env bash
set -e
# Create temp. directory and copy in sources.
tmpdir=$(mktemp -d)
trap "rm -rf ${tmpdir}" EXIT
(cd .. && tar cf - $(git ls-files)) | (cd ${tmpdir} && tar xf -)
if [ -e ../libhtp ]; then
(cd ../libhtp && git archive --format=tar --prefix=libhtp/ HEAD) | \
(cd ${tmpdir} && tar xvf -)
else
echo "error: this script required bundled libhtp..."
exit 1
fi
cd ${tmpdir}
# Do initial build.
./autogen.sh
./configure
./scripts/setup-app-layer.py --parser Echo
./scripts/setup-app-layer.py --detect Echo request
./scripts/setup-app-layer.py --logger Echo
./scripts/setup-decoder.sh Udplite
./scripts/setup-simple-detect.sh simpledetect
make distcheck