]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
template: script to check the setup scripts
authorJason Ish <ish@unx.ca>
Sun, 1 Oct 2017 10:28:07 +0000 (11:28 +0100)
committerJason Ish <ish@unx.ca>
Mon, 2 Oct 2017 16:28:23 +0000 (17:28 +0100)
This script applies the setup scripts one by one followed
by a make distcheck.

scripts/check-setup.sh [new file with mode: 0755]

diff --git a/scripts/check-setup.sh b/scripts/check-setup.sh
new file mode 100755 (executable)
index 0000000..11cb494
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+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.sh Echo
+
+./scripts/setup-app-layer-detect.sh Echo request
+
+./scripts/setup-app-layer-logger.sh Echo
+
+./scripts/setup-decoder.sh Udplite
+
+./scripts/setup-simple-detect.sh simpledetect
+
+make distcheck
+