1 |
10508
|
aaronmk
|
#!/bin/bash -e
|
2 |
|
|
# cleans up and formats Gimp's image map for publishing
|
3 |
|
|
. "$(dirname "${BASH_SOURCE[0]}")"/../../../lib/runscripts/util.run
|
4 |
|
|
.rel ../../../lib/sh/local.sh
|
5 |
|
|
|
6 |
|
|
if self_not_included; then
|
7 |
|
|
|
8 |
|
|
cleanup()
|
9 |
|
|
{
|
10 |
|
|
echo_func; set_make_vars
|
11 |
10510
|
aaronmk
|
in_place "$top_file" $sed_cmd \
|
12 |
|
|
-e 's/&/\&/g
|
13 |
|
|
# undo double-encodings' \
|
14 |
10516
|
aaronmk
|
-e 's/ +( -->)/\1/g
|
15 |
10510
|
aaronmk
|
# trim growing whitespace' \
|
16 |
|
|
|
17 |
10508
|
aaronmk
|
}
|
18 |
|
|
|
19 |
|
|
index.htm/make()
|
20 |
|
|
{
|
21 |
|
|
echo_func; set_make_vars
|
22 |
|
|
stdout="$target" to_file sed \
|
23 |
|
|
-e 's/( alt="[^:"]*): ([^"]*)(")/\1\3 title="\2"/g' \
|
24 |
|
|
"$top_file"
|
25 |
|
|
}
|
26 |
|
|
|
27 |
|
|
all()
|
28 |
|
|
{
|
29 |
|
|
echo_func
|
30 |
|
|
cleanup
|
31 |
|
|
index.htm/make
|
32 |
|
|
}
|
33 |
|
|
|
34 |
|
|
fi
|