From 9fda59e26dc775c4eebc1006f4f898aa6f7ca5c5 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 3 Aug 2016 14:03:09 +0200 Subject: [PATCH] Only use ~/.config/radare2/prefix/bin --- binr/r2pm/r2pm | 10 +++++----- libr/core/core.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/binr/r2pm/r2pm b/binr/r2pm/r2pm index e6a36436ea..682718dff9 100755 --- a/binr/r2pm/r2pm +++ b/binr/r2pm/r2pm @@ -24,14 +24,14 @@ export LIBEXT="`r2 -hh | grep LIBEXT | awk '{print $2}' 2> /dev/null`" export R2HOMEDIR="`r2 -hh | grep '^ RHOMEDIR' | awk '{print $2}' 2> /dev/null`" #[ -z "${R2PM_PLUGDIR}" ] && R2PM_PLUGDIR="${R2HOMEDIR}" export R2PM_PLUGDIR="${R2HOMEDIR}/plugins/" -# bindir -export R2PM_HOMEBINDIR="${R2PM_PLUGDIR}/bin/" -export R2PM_SYSBINDIR="${BINDIR}" -export R2PM_BINDIR=${R2PM_HOMEBINDIR} # prefix export R2PM_SYSPREFIX="${PREFIX}" export R2PM_HOMEPREFIX="${R2HOMEDIR}/prefix/" export R2PM_PREFIX="${R2PM_HOMEPREFIX}" +# bindir +export R2PM_HOMEBINDIR="${R2PM_HOMEPREFIX}/bin/" +export R2PM_SYSBINDIR="${BINDIR}" +export R2PM_BINDIR=${R2PM_HOMEBINDIR} # www export R2PM_SYSWWWROOT="`r2 -qc 'e http.root' --`" export R2PM_HOMEWWWROOT="${R2HOMEDIR}/www/" @@ -313,8 +313,8 @@ case "$1" in echo " -c,clean clear source cache" echo "Environment:" echo "SUDO=sudo use this tool as sudo" - #echo "R2PM_PREFIX=/usr prefix for syspkgs" echo "R2PM_PLUGDIR=~/.config/radare2/plugins # default value, home-install for plugins" + echo "R2PM_BINDIR=~/.config/radare2/prefix/bin # bindir in r2's PATH" echo "R2PM_PLUGDIR=/usr/lib/radare2/last/ # for system-wide plugin installs" ;; esac diff --git a/libr/core/core.c b/libr/core/core.c index 270e972be9..1d710c8bbc 100644 --- a/libr/core/core.c +++ b/libr/core/core.c @@ -1217,7 +1217,7 @@ R_API const char *r_core_anal_optype_colorfor(RCore *core, ut64 addr) { static void r_core_setenv (RCore *core) { char *e = r_sys_getenv ("PATH"); - char *h = r_str_home (".config/radare2/bin"); + char *h = r_str_home (".config/radare2/prefix/bin"); char *n = r_str_newf ("%s:%s", h, e); r_sys_setenv ("PATH", n); free (n);