blob: b6ecabc1e77edb58320fc909bfe10874b3a71ad1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/usr/bin/env bash
# build gophermap
cd "$HOME/src/gopher/phlog"
echo "+-----------------------------------+" > gophermap
echo "| Phil's Phlog |" >> gophermap
echo "+-----------------------------------+" >> gophermap
echo "" >> gophermap
echo "0[Rss feed] /phlog/rss.xml spike.nagatha.fr 70" >> gophermap
echo "" >> gophermap
dirs=($(ls -dr */))
for dir in "${dirs[@]}"; do
dt=$(echo "$dir" | cut -c 1-10)
title="$(head -n 1 "$dir/gophermap")"
echo -e "1$dt $title\t/phlog/$dir\tspike.nagatha.fr\t70" >> gophermap
done
exit 0
|