From 19d701ddf07d855128ded0cf2b573ce468e3bdd6 Mon Sep 17 00:00:00 2001 From: Ashlee Young Date: Wed, 20 Jan 2016 01:10:01 +0000 Subject: Removing Suricata and Audit from source repo, and updated build.sh to avoid building suricata. Will re-address this in C release via tar balls. Change-Id: I3710076f8b7f3313cb3cb5260c4eb0a6834d4f6e Signed-off-by: Ashlee Young --- framework/src/suricata/scripts/setup_decoder.sh | 85 ------------------------- 1 file changed, 85 deletions(-) delete mode 100644 framework/src/suricata/scripts/setup_decoder.sh (limited to 'framework/src/suricata/scripts/setup_decoder.sh') diff --git a/framework/src/suricata/scripts/setup_decoder.sh b/framework/src/suricata/scripts/setup_decoder.sh deleted file mode 100644 index 9af4104e..00000000 --- a/framework/src/suricata/scripts/setup_decoder.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -# -# Script to setup a new decoder. -# Written by Victor Julien -# - -set -e -#set -x - -function Usage { - echo - echo "$(basename $0) -- script to provision a decoder. The script" - echo "makes a copy of the decode-template, sets the name and updates" - echo " the build system." - echo - echo "Call from the 'src' directory, with one argument: the decoder name." - echo - echo "E.g. inside 'src': ../scripts/$(basename $0) ipv7" - echo -} - -function Done { - echo - echo "Decoder $NR has been set up in $FILE_C and $FILE_H and the" - echo "build system has been updated." - echo - echo "The decoder should now compile cleanly. Try running 'make'." - echo - echo "Next steps are to edit the files to implement the actual" - echo "decoding of $NR." - echo -} - -if [ $# -ne "1" ]; then - Usage - echo "ERROR: call with one argument" - exit 1 -fi - -INPUT=$1 -# lowercase -LC=${INPUT,,} -#echo $LC -# UPPERCASE -UC=${LC^^} -#echo $UC -# Normal -NR=${LC^} -#echo $NR - -FILE_C="decode-${LC}.c" -FILE_H="decode-${LC}.h" -#echo $FILE_C -#echo $FILE_H - -if [ ! -e ../configure.ac ] || [ ! -e Makefile.am ]; then - Usage - echo "ERROR: call from src/ directory" - exit 1 -fi -if [ ! -e decode-template.c ] || [ ! -e decode-template.h ]; then - Usage - echo "ERROR: input files decode-template.c and/or decode-template.h are missing" - exit 1 -fi -if [ -e $FILE_C ] || [ -e $FILE_H ]; then - Usage - echo "ERROR: file(s) $FILE_C and/or $FILE_H already exist, won't overwrite" - exit 1 -fi - -cp decode-template.c $FILE_C -cp decode-template.h $FILE_H - -# search and replaces -sed -i "s/TEMPLATE/${UC}/g" $FILE_C -sed -i "s/TEMPLATE/${UC}/g" $FILE_H -sed -i "s/Template/${NR}/g" $FILE_C -sed -i "s/Template/${NR}/g" $FILE_H -sed -i "s/template/${LC}/g" $FILE_C -sed -i "s/template/${LC}/g" $FILE_H -sed -i "s/decode-template.c decode-template.h \\\/decode-template.c decode-template.h \\\\\n${FILE_C} ${FILE_H} \\\/g" Makefile.am - -Done -exit 0 -- cgit 1.2.3-korg