From e8a52192d043e56476bd5dc04fd6985b57f5cbe4 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 29 Aug 2022 20:56:02 +0200 Subject: [PATCH] Add missing not-dynamic script --- script/not-dynamic.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 script/not-dynamic.sh diff --git a/script/not-dynamic.sh b/script/not-dynamic.sh new file mode 100755 index 00000000..b9a13070 --- /dev/null +++ b/script/not-dynamic.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +if [ "$#" -ne 1 ]; then + echo "[fail] usage: $0 binary" + exit 2 +fi + +if file $1 | grep 'dynamically linked' 2>&1; then + echo "[fail] $1 is dynamic" + exit 1 +fi +echo "[ok] $1 is probably static"