Improved helper scripts. (#1986)

* added additional (more restrictive) checks

Signed-off-by: lns <matzeton@googlemail.com>
This commit is contained in:
Toni
2023-05-28 12:45:44 +02:00
committed by GitHub
parent b11e6a453b
commit 6da3474203
21 changed files with 186 additions and 96 deletions
+5 -2
View File
@@ -1,8 +1,9 @@
#!/bin/sh
#!/usr/bin/env bash
set -e
cd "$(dirname "${0}")" || exit 1
. ./common.sh || exit 1
DEST=../src/lib/inc_generated/ndpi_google_match.c.inc
LIST=/tmp/google.list
@@ -13,8 +14,10 @@ echo "(1) Downloading file..."
echo "(2) Processing IP addresses..."
#https://cloud.google.com/vpc/docs/configure-private-google-access#ip-addr-defaults
python3 google.py > $LIST
is_file_empty "${LIST}"
./ipaddr2list.py $LIST NDPI_PROTOCOL_GOOGLE > $DEST
#rm -f $TMP $LIST
rm -f "${TMP}" "${LIST}"
is_file_empty "${DEST}"
echo "(3) Google IPs are available in $DEST"
exit 0