From 60b471c543a2334cd558cf369a2758f831c6f1f5 Mon Sep 17 00:00:00 2001 From: janson Date: Mon, 11 Mar 2024 18:56:57 +0800 Subject: [PATCH] better for simple install --- applications/luci-app-plex/simple-install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/applications/luci-app-plex/simple-install.sh b/applications/luci-app-plex/simple-install.sh index b0eb224..d930b3f 100755 --- a/applications/luci-app-plex/simple-install.sh +++ b/applications/luci-app-plex/simple-install.sh @@ -3,8 +3,19 @@ # run in router APPNAME=$1 +CURR=`pwd` 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 mkdir -p /usr/lib/lua/luci/view/${APPNAME}