git » libfiu » master » tree

[master] / tests / utils / wrap

#!/bin/bash

# Wrap the utilities (fiu-ctrl, fiu-ls, fiu-run) so that we can run them
# easily from within the development tree, agains the locally-built libraries.
#
# The first argument is the utility to run.

BASE="$(realpath `dirname ${0}`/../..)"

export LD_LIBRARY_PATH="$BASE/libfiu:$LD_LIBRARY_PATH"

case "$1" in
"fiu-ctrl")
	BIN=$BASE/utils/fiu-ctrl
	ARGS=
	;;
"fiu-ls")
	BIN=$BASE/utils/fiu-ls
	ARGS=
	;;
"fiu-run")
	BIN=$BASE/preload/run/fiu-run
	ARGS="-l $BASE/tests/utils/libs"
	;;
esac

shift

exec $BIN $ARGS "$@"