ports/devel/llvm-devel/files/llvm-wrapper.sh.in
Bryan Drewery 5471da0e72 Use exec in wrapper to avoid an extra shell process sticking around.
I purposely didn't bump PORTREVISION for this as it's not really
worth a rebuild even though technically required.

Approved by:		brooks
2018-11-14 18:12:23 +00:00

11 lines
279 B
Bash

#!/bin/sh
# $FreeBSD$
LLVM_PREFIX="%%LLVM_PREFIX%%"
LLVM_SUFFIX="%%LLVM_SUFFIX%%"
tool=$(/bin/realpath $0)
tool=${tool##*/}
tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}"
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \
exec "${tool}" "${@}"