aboutsummaryrefslogtreecommitdiff
path: root/script/not-dynamic.sh
diff options
context:
space:
mode:
authorAlex <lx@deuxfleurs.fr>2025-02-03 15:54:54 +0000
committerAlex <lx@deuxfleurs.fr>2025-02-03 15:54:54 +0000
commitb9df2d1ad1e80745350e25fd44ddaa0f0c6bcbab (patch)
tree02ca809d1305f8f76eedfac145fb843489d65d35 /script/not-dynamic.sh
parent4dc2bc337f10be616a141ba8b52564038ef3ae41 (diff)
parent390a5d97fece744bcad3c5b7b7d31b2722d0b092 (diff)
downloadgarage-b9df2d1ad1e80745350e25fd44ddaa0f0c6bcbab.tar.gz
garage-b9df2d1ad1e80745350e25fd44ddaa0f0c6bcbab.zip
Merge pull request 'compile with crane' (#950) from nix-crane into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/950
Diffstat (limited to 'script/not-dynamic.sh')
-rwxr-xr-xscript/not-dynamic.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/script/not-dynamic.sh b/script/not-dynamic.sh
index b9a13070..2beb4e0b 100755
--- a/script/not-dynamic.sh
+++ b/script/not-dynamic.sh
@@ -7,7 +7,12 @@ if [ "$#" -ne 1 ]; then
exit 2
fi
-if file $1 | grep 'dynamically linked' 2>&1; then
+if [ ! -x "$1" ]; then
+ echo "[fail] $1 does not exist or is not an executable"
+ exit 1
+fi
+
+if file "$1" | grep 'dynamically linked' 2>&1; then
echo "[fail] $1 is dynamic"
exit 1
fi