File: incfiles

package info (click to toggle)
pdns-recursor 4.1.11-1+deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,936 kB
  • sloc: cpp: 54,211; javascript: 26,587; sh: 11,872; makefile: 453; xml: 37
file content (24 lines) | stat: -rwxr-xr-x 475 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

export LC_ALL=C.UTF-8
export LANG=C.UTF-8

if [ -n "$1" ]
then
	DIR=$1/
fi

for a in $(find ${DIR}html -type f | grep -v \~ | sort)
do
	c=$(echo $a | sed s:${DIR}html/:: | tr "/.-" "___")
	echo "INCBIN(${c}, \"$a\");"
done

echo "map<string,string> g_urlmap={"
for a in $(find ${DIR}html -type f | grep -v \~ | sort)
do
	b=$(echo $a | sed s:${DIR}html/::g)
	c=$(echo $b | tr "/.-" "___")
	echo "{\"$b\", string((const char*)g${c}Data, g${c}Size)},"
done
echo "};"