summaryrefslogtreecommitdiffstats
path: root/incfiles
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:34:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:34:30 +0000
commit4fc2f55f761d71aae1f145d5aa94ba929cc39676 (patch)
tree5c1e1db3b46dd4edbe11f612d93cb94b96891ce3 /incfiles
parentInitial commit. (diff)
downloaddnsdist-4fc2f55f761d71aae1f145d5aa94ba929cc39676.tar.xz
dnsdist-4fc2f55f761d71aae1f145d5aa94ba929cc39676.zip
Adding upstream version 1.7.3.upstream/1.7.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'incfiles')
-rwxr-xr-xincfiles26
1 files changed, 26 insertions, 0 deletions
diff --git a/incfiles b/incfiles
new file mode 100755
index 0000000..9f96afe
--- /dev/null
+++ b/incfiles
@@ -0,0 +1,26 @@
+#!/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 "static const unsigned char g${c}Data[] = {"
+ od -v -t x1 "$a" | sed 's/^[0-7]*//' | sed 's/\([0-9a-f][0-9a-f]\)/0x\1,/g'
+ echo "};"
+done
+
+echo "static const map<string,string> s_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, sizeof(g${c}Data))},"
+done
+echo "};"