#!/usr/bin/env bashset-e
if["$#"-ne1];thenecho"[fail] usage: $0 binary"exit2fiif[!-x"$1"];thenecho"[fail] $1 does not exist or is not an executable"exit1fiiffile"$1"|grep'dynamically linked'2>&1;thenecho"[fail] $1 is dynamic"exit1fiecho"[ok] $1 is probably static"