Blob


1 #!/bin/sh
2 #
3 # stuff we should do in the makefile
4 # but can't for portability reasons
6 pair()
7 {
8 files="$files $2"
9 dotfiles="\${HOME}/$1 $dotfiles"
10 xxxfiles="${2%.lp} $xxxfiles"
11 cat <<EOF >> Makefile.local
12 \${HOME}/$1: $2
13 ./lpp \$? > \$@
15 EOF
16 }
18 conv()
19 {
20 gemfiles="gem/$1.gmi $gemfiles"
21 wwwfiles="www/$1.html $wwwfiles"
22 cat <<EOF >> Makefile.local
23 gem/$1.gmi: $2
24 sed 's/EXT/gmi'/ $2 | ./unpar | ./gc > \$@
26 www/$1.html: gem/$1.gmi header.html footer.html
27 sed 's!TITLE!$1!' header.html > \$@
28 sed 's/EXT/html/' $2 | ./unpar | ./gc | ./gem2html >> \$@
29 cat footer.html >> \$@
31 EOF
32 }
34 rm -f Makefile.local
36 pair .profile profile.lp
37 pair .kshrc kshrc.lp
39 conv index index.lp
40 for file in $files; do
41 conv "${file%.lp}" "$file"
42 done
44 cat <<EOF >> Makefile.local
45 DOTFILES = $dotfiles
46 GEMFILES = $gemfiles
47 WWWFILES = $wwwfiles
48 XXXFILES = $(printf "%s\n" $xxxfiles | sort | xargs echo)
49 EOF