2009-02-06 05:28:33 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-07-19 18:52:51 +08:00
|
|
|
pfx=$1
|
|
|
|
if [ -z "$pfx" ]; then
|
|
|
|
echo "Usage: ./env.sh [path-to-prefix]"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2009-02-06 05:28:33 +08:00
|
|
|
new_env='
|
2011-07-19 18:52:51 +08:00
|
|
|
LIBR_PLUGINS=${pfx}/lib/radare2
|
|
|
|
PATH=$pfx/bin:${PATH}
|
|
|
|
LD_LIBRARY_PATH=$pfx/lib:$LD_LIBRARY_PATH
|
|
|
|
DYLD_LIBRARY_PATH=$pfx/lib:$LD_LIBRARY_PATH
|
2009-02-16 06:32:17 +08:00
|
|
|
PKG_CONFIG_PATH=$PWD/libr/
|
2009-02-06 05:28:33 +08:00
|
|
|
'
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "==> Entering radare2 environment shell..."
|
|
|
|
echo
|
|
|
|
echo $new_env $SHELL \
|
|
|
|
| sed -e 's, ,\n,g' \
|
|
|
|
| sed -e 's,^, ,g' \
|
2009-03-12 10:03:18 +08:00
|
|
|
| sed -e 's,$, \\,'
|
2009-02-06 05:28:33 +08:00
|
|
|
echo
|
|
|
|
|
|
|
|
eval $new_env $SHELL
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "==> Back to system shell..."
|
|
|
|
echo
|