aboutsummaryrefslogtreecommitdiff
path: root/local-tomo
blob: c7eaeb21840d129d34ba82c7560630a663dc4b62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
version=$(awk '/^## / {print $2; exit}' CHANGES.md)
here="$(realpath "$(dirname "$0")")"
if [ ! -e "$here/build/bin/tomo_$version" ]; then
    echo "Tomo hasn't been compiled yet! Run \`make\` to compile it!"
    exit 1;
fi

PATH="$here/build/bin${PATH:+:$PATH}" \
LD_LIBRARY_PATH="$here/build/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
LIBRARY_PATH="$here/build/lib${LIBRARY_PATH:+:$LIBRARY_PATH}" \
C_INCLUDE_PATH="$here/build/include${C_INCLUDE_PATH:+:$C_INCLUDE_PATH}" \
CPATH="$here/build/include${CPATH:+:$CPATH}" \
tomo_"$version" "$@"