diff --git a/luci-app-tinyfilemanager/makenew.sh b/luci-app-tinyfilemanager/makenew.sh index 6237b5121..43daf18b7 100755 --- a/luci-app-tinyfilemanager/makenew.sh +++ b/luci-app-tinyfilemanager/makenew.sh @@ -48,7 +48,7 @@ url= out= type= -# \.(css|js) +# \.(css|js) main ref for _i in $(seq 0 1 $[ ${#refurl[@]} -1 ]); do eval "url=${refurl[$_i]}" out=${url##*/} @@ -64,6 +64,7 @@ ref=$(for _p in $(find * -type f ! -path "$PKG_DIR/*"); do \ [ "$?" == "0" ] && echo $_p; \ done) +# ref of main ref for _i in $ref; do suburl=($(sed -E "s/(,|;)/\1\n/g" $_i | grep -E "\burl\([^\)]+\)" | grep -Ev "\burl\(\"data:image" | sed -En "s|^[^']+'([^']+)'.+|\1| p")) hosturl=$(for _ in "${refurl[@]}"; do grep "${_i##*/}" <<< "$_"; done) diff --git a/luci-app-tinyfilemanager/root/usr/libexec/tinyfilemanager-update b/luci-app-tinyfilemanager/root/usr/libexec/tinyfilemanager-update index 3627e79e4..d61464a4f 100755 --- a/luci-app-tinyfilemanager/root/usr/libexec/tinyfilemanager-update +++ b/luci-app-tinyfilemanager/root/usr/libexec/tinyfilemanager-update @@ -51,7 +51,7 @@ url= out= path= -# \.(css|js) +# \.(css|js) main ref for _i in $(seq 0 1 $[ ${#refurl[@]} -1 ]); do eval "url=${refurl[$_i]}" out=${url##*/} @@ -67,6 +67,7 @@ ref=$(for _p in $(find * -type f); do \ [ "$?" == "0" ] && echo $_p; \ done) +# ref of main ref for _i in $ref; do suburl=($(sed -E "s/(,|;)/\1\n/g" $_i | grep -E "\burl\([^\)]+\)" | grep -Ev "\burl\(\"data:image" | sed -En "s|^[^']+'([^']+)'.+|\1| p")) hosturl=$(for _ in "${refurl[@]}"; do grep "${_i##*/}" <<< "$_"; done)