]> git.ipfire.org Git - thirdparty/pdns.git/blob - pdns/dnsdistdist/incfiles
Merge pull request #9229 from rgacogne/dnsdist-webserver-allow-from
[thirdparty/pdns.git] / pdns / dnsdistdist / incfiles
1 #!/bin/sh
2
3 export LC_ALL=C.UTF-8
4 export LANG=C.UTF-8
5
6 if [ -n "$1" ]
7 then
8 DIR=$1/
9 fi
10
11 for a in $(find ${DIR}html -type f | grep -v \~ | sort)
12 do
13 c=$(echo $a | sed s:${DIR}html/:: | tr "/.-" "___")
14 echo "INCBIN(${c}, \"$a\");"
15 done
16
17 echo "map<string,string> g_urlmap={"
18 for a in $(find ${DIR}html -type f | grep -v \~ | sort)
19 do
20 b=$(echo $a | sed s:${DIR}html/::g)
21 c=$(echo $b | tr "/.-" "___")
22 echo "{\"$b\", string((const char*)g${c}Data, g${c}Size)},"
23 done
24 echo "};"