Add www-m r2pm pkg

This commit is contained in:
pancake 2016-03-27 16:03:12 +02:00
parent d1455c5aa6
commit 9fec5ae3b2

31
binr/r2pm/d/www-m Normal file
View File

@ -0,0 +1,31 @@
R2PM_BEGIN
R2PM_GIT "https://github.com/radare/radare2-webui"
R2PM_DESC "[r2-www] The Material WebUI of /m"
R2PM_INSTALL() {
cd www/m || exit 1
make || exit 1
WWWROOT=`r2 -qce' http.root' - 2> /dev/null`
if [ -n "${WWWROOT}" ]; then
rm -rf "${WWWROOT}/m"/*
mkdir -p "${WWWROOT}/m"
echo "Installing /m..."
tar xzvf dist.tar.gz -C "${WWWROOT}/m"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_UNINSTALL() {
WWWROOT=`r2 -qce' http.root' - 2>/dev/null`
if [ -n "${WWWROOT}" ]; then
rm -rf "{WWWROOT}/m"
else
echo "Cannot find WWWROOT"
exit 1
fi
}
R2PM_END