2009-02-05 21:28:33 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-07-19 10:52:51 +00:00
|
|
|
pfx=$1
|
|
|
|
if [ -z "$pfx" ]; then
|
|
|
|
echo "Usage: ./env.sh [path-to-prefix]"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2009-02-05 21:28:33 +00:00
|
|
|
new_env='
|
2011-07-19 10:52:51 +00: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-15 22:32:17 +00:00
|
|
|
PKG_CONFIG_PATH=$PWD/libr/
|
2009-02-05 21:28:33 +00:00
|
|
|
'
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "==> Entering radare2 environment shell..."
|
|
|
|
echo
|
|
|
|
echo $new_env $SHELL \
|
|
|
|
| sed -e 's, ,\n,g' \
|
|
|
|
| sed -e 's,^, ,g' \
|
2009-03-12 02:03:18 +00:00
|
|
|
| sed -e 's,$, \\,'
|
2009-02-05 21:28:33 +00:00
|
|
|
echo
|
|
|
|
|
|
|
|
eval $new_env $SHELL
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "==> Back to system shell..."
|
|
|
|
echo
|