xref: /aoo42x/main/solenv/bin/localize (revision cdf0e10c)
1*cdf0e10cSrcweir#!/bin/sh
2*cdf0e10cSrcweirif [ x${SOLARENV}x = xx ]; then
3*cdf0e10cSrcweir    echo No environment found, please use 'setsolar'
4*cdf0e10cSrcweirexit 1
5*cdf0e10cSrcweirfi
6*cdf0e10cSrcweir
7*cdf0e10cSrcweir# localize.pl calls localize_sl in solver bin directory which depends on dynamic
8*cdf0e10cSrcweir# libraries in solver lib directory but has no correct RPATH (or equivalent):
9*cdf0e10cSrcweirif [ "${OS?}" = MACOSX ]; then
10*cdf0e10cSrcweir    export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT}
11*cdf0e10cSrcweirelse
12*cdf0e10cSrcweir    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT}
13*cdf0e10cSrcweirfi
14*cdf0e10cSrcweir
15*cdf0e10cSrcweirif [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx  ]; then
16*cdf0e10cSrcweir    exec perl -w $SOLARVERSION/$INPATH/bin/localize.pl "$@"
17*cdf0e10cSrcweirelse
18*cdf0e10cSrcweir    exec perl -w $SOLARVERSION/$INPATH/bin$UPDMINOREXT/localize.pl "$@"
19*cdf0e10cSrcweirfi
20*cdf0e10cSrcweir
21