File: mk-newgtlds.sh

package info (click to toggle)
dnstop 20240820-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 416 kB
  • sloc: ansic: 5,599; sh: 377; makefile: 57
file content (23 lines) | stat: -rw-r--r-- 366 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
set -e
wget -O /tmp/newgtlds https://newgtlds.icann.org/newgtlds.csv
exec </tmp/newgtlds

cat <<EOF

static const char *NewGTLDs_array[] = {
EOF
IFS=','

while read t x ; do
	echo $t | grep -sq '^#' && continue;
	echo $t | grep -sq '^>>>' && continue;
	x=`echo $t | tr A-Z a-z`
	test "$t" = "tld" && continue;
	echo "	\"$x\","
done

cat <<EOF
	NULL
};
EOF