mirror of https://github.com/dirtbags/moth.git
Script to list teams
This commit is contained in:
parent
3c7a6e06c3
commit
2fe4123f87
|
@ -0,0 +1,32 @@
|
|||
#! /bin/sh
|
||||
|
||||
escape () {
|
||||
sed 's/&/\&/g;s/</\</g;s/>/\>/g'
|
||||
}
|
||||
|
||||
title='Teams'
|
||||
|
||||
cat <<EOF
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>$title</title>
|
||||
<link rel="stylesheet" href="ctf.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>$title</h1>
|
||||
EOF
|
||||
|
||||
echo "<table>"
|
||||
echo "<tr><th>Team Name</th><th>Token</th></tr>"
|
||||
for i in ??????; do
|
||||
echo "<tr><td>"
|
||||
escape < $i
|
||||
echo "</td><td><samp>$i</samp></td></tr>"
|
||||
done
|
||||
echo "</table>"
|
||||
|
||||
cat <<EOF
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
Loading…
Reference in New Issue