mirror of https://github.com/OISF/suricata
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.pull/6324/head
parent
71196098a1
commit
16a21d7839
@ -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
|
@ -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
|
Loading…
Reference in New Issue