[ci] Fix netbsd job to upgrade existing packages
[xapian.git] / xapian-maintainer-tools / profiling / xapian-io-profile
bloba21b720c55eb3fbeb6c9c9686d8b9158ad27e81e
1 #!/bin/sh
2 set -e
4 case $1 in
5 --log=*)
6 log_file=${1#*=}
7 shift
8 exec 9>"$log_file"
9 export XAPIAN_IO_PROFILE_LOG_FD=9
11 esac
13 # Extract the path to this script - we expect profiler.so to be in the same
14 # directory.
15 dir=.
16 case $0 in
17 */*) dir=${0%/*} ;;
18 esac
20 LD_PRELOAD=$dir/profiler.so exec "$@"