mirror of
https://github.com/utoni/nDPId.git
synced 2026-04-28 06:59:35 +00:00
* fixed run_tests.sh file check bug, CI compat * updated results due to libnDPI submodule update Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
26 lines
546 B
Bash
Executable file
26 lines
546 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
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;
|
|
}
|
|
|
|
set -x
|
|
|
|
cd "$(dirname "${0}")/.."
|
|
if [ -d ./.git ]; then
|
|
git submodule update --init ./libnDPI
|
|
fi
|
|
|
|
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}"
|