From 68721cd2ad32f8effb3ee3d53cb690399b6b065d Mon Sep 17 00:00:00 2001 From: pancake Date: Fri, 1 Aug 2014 00:19:57 +0200 Subject: [PATCH] Add sys/duktape.sh --- sys/duktape.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 sys/duktape.sh diff --git a/sys/duktape.sh b/sys/duktape.sh new file mode 100755 index 0000000000..24c8c6ae95 --- /dev/null +++ b/sys/duktape.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# find root +cd `dirname $PWD/$0` +./clone-r2-bindings.sh +cd .. + +. ./sys/CONFIG +echo ============= +cat sys/CONFIG +echo ============= + +[ -z "${PREFIX}" ] && PREFIX=/usr +ID=`id -u` +[ -n "${NOSUDO}" ] && SUDO= + +export DESTDIR + +cd radare2-bindings +#./configure --prefix=${PREFIX} --enable=duktype || exit 1 +cd libr/lang/p +make clean +make +rm ~/.config/radare2/plugins/lang_duktape.* +if [ "$ID" = 0 ]; then + make install DESTDIR=${DESTDIR} +else + make install-home +fi +[ "$1" != '--no-install' ] && \ + ${SUDO} make install DESTDIR=${DESTDIR}