Blob


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