From aca1615dc13bac949d507c493e9cef80fd2402ef Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Tue, 13 Sep 2022 13:53:29 +0200 Subject: OpenWrt packaging support. Signed-off-by: Toni Uhlig --- scripts/get-and-build-libndpi.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts') diff --git a/scripts/get-and-build-libndpi.sh b/scripts/get-and-build-libndpi.sh index 75158b43c..35a6bd8b1 100755 --- a/scripts/get-and-build-libndpi.sh +++ b/scripts/get-and-build-libndpi.sh @@ -2,6 +2,8 @@ set -e +GITHUB_FALLBACK_URL='https://github.com/ntop/nDPI/archive/refs/heads/dev.zip' + LOCKFILE="$(realpath "${0}").lock" touch "${LOCKFILE}" exec 42< "${LOCKFILE}" @@ -35,6 +37,16 @@ set -x cd "$(dirname "${0}")/.." if [ -d ./.git ]; then git submodule update --init ./libnDPI +else + printf '%s' '-----------------------------------' + printf 'WARNING: %s is supposed to be a GIT repository. But it is not.' "$(realpath $(dirname "${0}")/..)" + printf '%s' 'Can not clone libnDPI as GIT submodule.' + printf '%s' 'Falling back to Github direct download.' + printf 'URL: %s' "${GITHUB_FALLBACK_URL}" + printf '%s' '-----------------------------------' + wget "${GITHUB_FALLBACK_URL}" -O ./libnDPI-github-dev.zip + unzip ./libnDPI-github-dev.zip + mv ./nDPI-dev ./libnDPI fi cd ./libnDPI -- cgit v1.2.3