From: Otto Moerbeek Date: Wed, 17 Aug 2022 07:35:39 +0000 (+0200) Subject: Only include files really needed: skip non-mminimzed versions and LICENSE and fix... X-Git-Tag: rec-4.8.0-alpha1~54^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6dff6759deea4c926a3714dcbe88098ed82cd07;p=thirdparty%2Fpdns.git Only include files really needed: skip non-mminimzed versions and LICENSE and fix dependencies --- diff --git a/pdns/recursordist/Makefile.am b/pdns/recursordist/Makefile.am index 962b367fe5..8be3d49b44 100644 --- a/pdns/recursordist/Makefile.am +++ b/pdns/recursordist/Makefile.am @@ -41,7 +41,7 @@ BUILT_SOURCES=htmlfiles.h \ CLEANFILES = htmlfiles.h \ recursor.conf-dist -htmlfiles.h: html/* +htmlfiles.h: incfiles html/* html/js/* ./incfiles > $@ SUBDIRS=ext diff --git a/pdns/recursordist/incfiles b/pdns/recursordist/incfiles index a65909a53e..b0e67ec0f4 100755 --- a/pdns/recursordist/incfiles +++ b/pdns/recursordist/incfiles @@ -8,7 +8,10 @@ then DIR=$1/ fi -for a in $(find ${DIR}html -type f | grep -v \~ | sort) +files=$(find ${DIR}html -type f \( -name '*.css' -or -name '*.html' -or -name '*.png' -or -name 'local-2022.js' -or -name '*min.js' \) | sort) + +echo // $files +for a in $files do c=$(echo $a | sed s:${DIR}html/:: | tr "/.-" "___") echo "static const unsigned char g${c}Data[] = {" @@ -17,7 +20,7 @@ do done echo "static const map g_urlmap={" -for a in $(find ${DIR}html -type f | grep -v \~ | sort) +for a in $files do b=$(echo $a | sed s:${DIR}html/::g) c=$(echo $b | tr "/.-" "___")