blob: 60b343d201754fc37bd2c277f7b9319fd45e21f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/sh
mkdir -p dest
cat > dest/index.html <<EOF
<!doctype html>
<html lang="pl">
<head>
<title>Sprzęt 19PDH Puszcza</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body {
margin: 0 auto;
font-family: sans-serif;
max-width: 80ex;
box-sizing: border-box;
padding: 1ex;
}
img {
width: 80%;
margin-left: 10%;
}
</style>
</head>
<body>
<h1>Sprzęt 19PDH Puszcza</h1>
<h2>Zastępy</h2>
<ul>
EOF
cat > dest/index.gmi <<EOF
# Sprzęt 19PDH Puszcza
EOF
for f in `find zastępy -name '*.csv'`; do
name=$(basename $f .csv)
./report.sh $name > dest/$name.pdf
echo "<li><a href="$name.pdf">$name</a></li>" >> dest/index.html
echo "=> $name.pdf $name" >> dest/index.gmi
done
cat >> dest/index.html <<EOF
</body>
</html>
EOF
rsync -aP ./dest/ srv1:/srv/www/zhr.niedzwiedzinski.cyou/sprzet
|