linkerd2/bin/linkerd

18 lines
313 B
Bash
Executable File

#!/usr/bin/env sh
set -eu
bindir=$( cd "${0%/*}" && pwd )
rootdir=$( cd "$bindir"/.. && pwd )
# shellcheck source=_os.sh
. "$bindir"/_os.sh
bin=$rootdir/target/cli/$(os)/linkerd
# build linkerd executable if it does not exist
if [ ! -f "$bin" ]; then
"$bindir"/build-cli-bin >/dev/null
fi
exec "$bin" "$@"