better for simple install

This commit is contained in:
janson 2024-03-11 18:56:57 +08:00
parent 7377f257aa
commit 60b471c543

View File

@ -3,8 +3,19 @@
# run in router # run in router
APPNAME=$1 APPNAME=$1
CURR=`pwd`
if [ -z "${APPNAME}" ]; then if [ -z "${APPNAME}" ]; then
APPNAME=plex APPNAME=`basename "$CURR"|cut -d '-' -f 3`
fi
if [ -z "${APPNAME}" ]; then
echo "please run in luci-app-xxx paths"
exit 1
fi
if [ ! -d luasrc ]; then
echo "luasrc not found, please run in luci-app-xxx paths"
exit 1
fi fi
mkdir -p /usr/lib/lua/luci/view/${APPNAME} mkdir -p /usr/lib/lua/luci/view/${APPNAME}