From: Jason Ish Date: Thu, 29 Oct 2020 23:05:01 +0000 (-0600) Subject: scripts: bundle script for requirements X-Git-Tag: suricata-7.0.0-beta1~1449 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16a21d78397ea13a5ca1b4c22f839ab6626a7580;p=thirdparty%2Fsuricata.git scripts: bundle script for requirements Add a bundle.sh script to bundle the requirements of libhtp and suricata-update. This uses a Python like requirements.txt file to specify the URL to download for libhtp and suricata-update. --- diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..4a1d935583 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +libhtp https://github.com/OISF/libhtp/archive/0.5.x.tar.gz +suricata-update https://github.com/OISF/suricata-update/archive/master.tar.gz diff --git a/scripts/bundle.sh b/scripts/bundle.sh new file mode 100755 index 0000000000..f630403990 --- /dev/null +++ b/scripts/bundle.sh @@ -0,0 +1,21 @@ +#! /usr/bin/env bash + +while IFS= read -r requirement; do + set -- $requirement + case "$1" in + suricata-update) + echo "===> Fetching $1" + (cd suricata-update && + curl -Ls "$2" | tar zxf - --strip-components=1) + ;; + libhtp) + echo "===> Fetching $1" + mkdir -p libhtp + (cd libhtp && + curl -Ls "$2" | tar zxf - --strip-components=1) + ;; + *) + echo "error: unknown requirement: $1" + ;; + esac +done < ./requirements.txt