From 5954e46340c4851d40aecece4622f5082398ad66 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 7 Jun 2021 16:22:49 +0200 Subject: Build system cleanup / cosmetics. * libnDPI submodule update Signed-off-by: Toni Uhlig --- scripts/get-and-build-libndpi.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 scripts/get-and-build-libndpi.sh (limited to 'scripts/get-and-build-libndpi.sh') diff --git a/scripts/get-and-build-libndpi.sh b/scripts/get-and-build-libndpi.sh new file mode 100755 index 000000000..df0ab2b2c --- /dev/null +++ b/scripts/get-and-build-libndpi.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -e +set -x + +LOCKFILE="$(realpath "${0}").lock" +touch "${LOCKFILE}" +exec 42< "${LOCKFILE}" +flock -x -n 42 || { + printf '%s\n' "Could not aquire file lock for ${0}. Already running instance?" >&2; + exit 1; +} + +cd "$(dirname "${0}")/.." +git submodule update --init ./libnDPI + +cd ./libnDPI +DEST_INSTALL="${DEST_INSTALL:-$(realpath ./install)}" +MAKE_PROGRAM="${MAKE_PROGRAM:-make -j4}" +./autogen.sh --prefix="${DEST_INSTALL}" --with-only-libndpi +${MAKE_PROGRAM} install + +rm -f "${LOCKFILE}" -- cgit v1.2.3