From 78a076247ca9722e6aa791b492085ca3380228f2 Mon Sep 17 00:00:00 2001 From: drighetto Date: Tue, 30 Jan 2024 10:39:55 +0100 Subject: [PATCH] Add CI script --- ci.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ci.sh diff --git a/ci.sh b/ci.sh new file mode 100644 index 0000000..3db4738 --- /dev/null +++ b/ci.sh @@ -0,0 +1,19 @@ +#!/bin/bash +############################################################ +# Script to perform the "Continuous Integration" validation +############################################################ +# Define the output file destination +OUT=/tmp/out-$RANDOM-$RANDOM.tmp +echo "OUT set to file: $OUT." +# Execute the script +python wpr.py -d righettod.eu -s -n 8.8.8.8 -t 30 > $OUT +# Validate the execution +marker=$(grep -Fc "Reconnaissance finished" $OUT) +echo "Marker occurences found into the OUT file: $marker." +rm $OUT +if [ $marker -eq 0 ] +then + exit -1 +else + exit 0 +fi