diff --git a/Makefile b/Makefile index 767ef8c2db90f..93acf0a7b1241 100644 --- a/Makefile +++ b/Makefile @@ -3,3 +3,10 @@ all: clean: cd libr && make clean + +install: + mkdir -p prefix + cd libr && make install PREFIX=${PWD}/prefix + +deinstall: + rm -rf prefix diff --git a/env.sh b/env.sh new file mode 100755 index 0000000000000..4bc2012a92eea --- /dev/null +++ b/env.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +new_env=' +LIBR_PLUGINS=$PATH:$PWD/prefix/lib/radare2 +PATH=$PATH:$PWD/prefix/bin +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/prefix/lib +' + +echo +echo "==> Entering radare2 environment shell..." +echo +echo $new_env $SHELL \ + | sed -e 's, ,\n,g' \ + | sed -e 's,^, ,g' \ + | sed -e 's,$,\\,' +echo + +eval $new_env $SHELL + +echo +echo "==> Back to system shell..." +echo diff --git a/libr/Makefile b/libr/Makefile index b377036618982..0268e82b09333 100644 --- a/libr/Makefile +++ b/libr/Makefile @@ -2,7 +2,7 @@ PREFIX=/tmp/libr-install # Libraries -LIBLIST=io io/plugins util bin macro hash print config flags cons line lib syscall range socket cmd asm search core diff debug reg +LIBLIST=io io/p util lib lang bin macro hash line cons print config flags syscall range socket cmd asm search diff debug reg core # Under development diff --git a/libr/core/cmd.c b/libr/core/cmd.c index a568fbbb4d818..49affbee2b73b 100644 --- a/libr/core/cmd.c +++ b/libr/core/cmd.c @@ -652,7 +652,7 @@ static int r_core_cmd_subst(struct r_core_t *core, char *cmd, int *rs, int *rfd, *times = len; } if (cmd[0]=='\0') - return; + return 0; /* quoted / raw command */ if (cmd[0]=='"') { diff --git a/libr/io/plugins/Makefile b/libr/io/p/Makefile similarity index 100% rename from libr/io/plugins/Makefile rename to libr/io/p/Makefile diff --git a/libr/io/plugins/README b/libr/io/p/README similarity index 100% rename from libr/io/plugins/README rename to libr/io/p/README diff --git a/libr/io/plugins/dbg.c b/libr/io/p/dbg.c similarity index 100% rename from libr/io/plugins/dbg.c rename to libr/io/p/dbg.c diff --git a/libr/io/plugins/malloc.c b/libr/io/p/malloc.c similarity index 100% rename from libr/io/plugins/malloc.c rename to libr/io/p/malloc.c diff --git a/libr/io/plugins/ptrace.c b/libr/io/p/ptrace.c similarity index 100% rename from libr/io/plugins/ptrace.c rename to libr/io/p/ptrace.c