aboutsummaryrefslogtreecommitdiff
path: root/script/not-dynamic.sh
diff options
context:
space:
mode:
Diffstat (limited to 'script/not-dynamic.sh')
-rwxr-xr-xscript/not-dynamic.sh14
1 files changed, 14 insertions, 0 deletions
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"