#!/bin/sh -e

export GAG_GAG="${HOME}/.gag"
export GAG_ROOT_DIR="@PREFIX@/lib/imager"
export GAG_PATH="${GAG_ROOT_DIR}/etc"
export GAG_EXEC_SYSTEM="@ARCH@-darwin-gfortran"

[ -z "$PYTHONPATH" ] || PYTHONPATH=":$PYTHONPATH"
export PYTHONPATH="$GAG_ROOT_DIR/$GAG_EXEC_SYSTEM/python$PYTHONPATH"

export PYTHONPATH
export DYLD_LIBRARY_PATH=${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/lib/
exec ${GAG_ROOT_DIR}/${GAG_EXEC_SYSTEM}/bin/sic "$@"
