Project

General

Profile

1
#!/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
	in_place "$top_file" $sed_cmd \
12
-e 's/&/\&/g
13
# undo double-encodings' \
14
-e 's/ +( -->)/\1/g
15
# trim growing whitespace' \
16

    
17
}
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
(3-3/4)