Blame


1 7b4d8efb 2022-02-04 op #!/bin/sh
2 7b4d8efb 2022-02-04 op #
3 7b4d8efb 2022-02-04 op # stuff we should do in the makefile
4 7ae13e25 2022-02-04 op # but can't for portability reasons.
5 7ae13e25 2022-02-04 op # public domain
6 7b4d8efb 2022-02-04 op
7 678b3cb3 2022-03-16 op copy()
8 678b3cb3 2022-03-16 op {
9 678b3cb3 2022-03-16 op dotfiles="$HOME/$1 $dotfiles"
10 678b3cb3 2022-03-16 op
11 678b3cb3 2022-03-16 op dname=$(dirname "$HOME/$1")
12 678b3cb3 2022-03-16 op cat <<EOF >> Makefile.local
13 678b3cb3 2022-03-16 op $HOME/$1: $2
14 678b3cb3 2022-03-16 op [ ! -d "$dname" ] && mkdir -p "$dname" || true
15 678b3cb3 2022-03-16 op cp \$? \$@
16 678b3cb3 2022-03-16 op EOF
17 678b3cb3 2022-03-16 op }
18 678b3cb3 2022-03-16 op
19 7b4d8efb 2022-02-04 op pair()
20 7b4d8efb 2022-02-04 op {
21 7b4d8efb 2022-02-04 op files="$files $2"
22 c6435c22 2022-02-04 op dotfiles="$HOME/$1 $dotfiles"
23 6b8ba66c 2022-02-04 op xxxfiles="${2%.lp} $xxxfiles"
24 c6435c22 2022-02-04 op
25 c6435c22 2022-02-04 op dname=$(dirname "$HOME/$1")
26 7b4d8efb 2022-02-04 op cat <<EOF >> Makefile.local
27 c6435c22 2022-02-04 op $HOME/$1: $2
28 c6435c22 2022-02-04 op [ ! -d "$dname" ] && mkdir -p "$dname" || true
29 7b4d8efb 2022-02-04 op ./lpp \$? > \$@
30 7b4d8efb 2022-02-04 op EOF
31 7e6fb0e3 2022-02-21 op
32 7e6fb0e3 2022-02-21 op if [ -n "$3" ]; then
33 7e6fb0e3 2022-02-21 op printf '\tchmod %s $@\n' "$3" >> Makefile.local
34 7e6fb0e3 2022-02-21 op fi
35 7e6fb0e3 2022-02-21 op echo >> Makefile.local
36 7b4d8efb 2022-02-04 op }
37 7b4d8efb 2022-02-04 op
38 6b8ba66c 2022-02-04 op conv()
39 6b8ba66c 2022-02-04 op {
40 6b8ba66c 2022-02-04 op gemfiles="gem/$1.gmi $gemfiles"
41 6b8ba66c 2022-02-04 op wwwfiles="www/$1.html $wwwfiles"
42 662b0d05 2022-02-21 op dname=$(dirname "$1")
43 6b8ba66c 2022-02-04 op cat <<EOF >> Makefile.local
44 6b8ba66c 2022-02-04 op gem/$1.gmi: $2
45 662b0d05 2022-02-21 op [ ! -d "gem/$dname" ] && mkdir -p "gem/$dname" || true
46 6b8ba66c 2022-02-04 op sed 's/EXT/gmi'/ $2 | ./unpar | ./gc > \$@
47 6b8ba66c 2022-02-04 op
48 6b8ba66c 2022-02-04 op www/$1.html: gem/$1.gmi header.html footer.html
49 662b0d05 2022-02-21 op [ ! -d "www/$dname" ] && mkdir -p "www/$dname" || true
50 6b8ba66c 2022-02-04 op sed 's!TITLE!$1!' header.html > \$@
51 6b8ba66c 2022-02-04 op sed 's/EXT/html/' $2 | ./unpar | ./gc | ./gem2html >> \$@
52 6b8ba66c 2022-02-04 op cat footer.html >> \$@
53 6b8ba66c 2022-02-04 op
54 6b8ba66c 2022-02-04 op EOF
55 6b8ba66c 2022-02-04 op }
56 6b8ba66c 2022-02-04 op
57 7b4d8efb 2022-02-04 op rm -f Makefile.local
58 7b4d8efb 2022-02-04 op
59 37301a13 2022-02-04 op pair .profile profile.lp
60 37301a13 2022-02-04 op pair .kshrc kshrc.lp
61 37301a13 2022-02-04 op pair lib/profile rc.lp
62 72623747 2022-02-04 op pair .sqliterc sqliterc.lp
63 456488bc 2022-02-04 op pair .psqlrc psqlrc.lp
64 f7481580 2022-02-21 op pair .cwmrc cwmrc.lp
65 28e06989 2022-05-23 op pair .mg mg.lp
66 432335a8 2022-02-21 op
67 7e6fb0e3 2022-02-21 op pair bin/acmerc bin/acmerc.lp +x
68 79ed446f 2022-05-09 op pair bin/amused-monitor bin/amused-monitor.lp +x
69 7e6fb0e3 2022-02-21 op pair bin/browser bin/browser.lp +x
70 e5bee144 2022-05-09 op pair bin/clip bin/clip.lp +x
71 0f4372e2 2022-10-03 op pair bin/diffstat bin/diffstat.lp +x
72 616e27e6 2022-07-29 op pair bin/gamemode bin/gamemode.lp +x
73 335917eb 2022-05-10 op pair bin/gmi2txt bin/gmi2txt.lp +x
74 0e30865e 2022-08-10 op pair bin/mquote bin/mquote.lp +x
75 29db91b2 2023-02-16 op pair bin/nof bin/nof.lp +x
76 5c12d511 2022-07-29 op pair bin/sshot bin/sshot.lp +x
77 90081c80 2022-11-23 op pair bin/template bin/template.lp +x
78 7b4d8efb 2022-02-04 op
79 b35d34ae 2022-12-28 op copy bin/news bin/news
80 b35d34ae 2022-12-28 op
81 c1e9083b 2022-02-21 op pair .config/herbstluftwm/autostart config/herbstluftwm/autostart.lp
82 405b6660 2022-02-22 op pair .config/herbstluftwm/panel config/herbstluftwm/panel.lp +x
83 405b6660 2022-02-22 op pair .config/herbstluftwm/process.awk config/herbstluftwm/process.awk.lp
84 405b6660 2022-02-22 op pair .config/herbstluftwm/lib config/herbstluftwm/lib.lp
85 405b6660 2022-02-22 op pair .config/herbstluftwm/event-gen config/herbstluftwm/event-gen.lp
86 c1e9083b 2022-02-21 op
87 678b3cb3 2022-03-16 op pair .emacs.d/early-init.el emacs/early-init.el.lp
88 678b3cb3 2022-03-16 op copy .emacs.d/init.el emacs/init.el
89 678b3cb3 2022-03-16 op copy .emacs.d/minimal-theme.el emacs/minimal-theme.el
90 678b3cb3 2022-03-16 op copy .emacs.d/simple-pass.el emacs/simple-pass.el
91 678b3cb3 2022-03-16 op
92 37301a13 2022-02-04 op conv index index.lp
93 7b4d8efb 2022-02-04 op for file in $files; do
94 6b8ba66c 2022-02-04 op conv "${file%.lp}" "$file"
95 7b4d8efb 2022-02-04 op done
96 7b4d8efb 2022-02-04 op
97 7b4d8efb 2022-02-04 op cat <<EOF >> Makefile.local
98 6b8ba66c 2022-02-04 op DOTFILES = $dotfiles
99 7b4d8efb 2022-02-04 op GEMFILES = $gemfiles
100 7b4d8efb 2022-02-04 op WWWFILES = $wwwfiles
101 6b8ba66c 2022-02-04 op XXXFILES = $(printf "%s\n" $xxxfiles | sort | xargs echo)
102 7b4d8efb 2022-02-04 op EOF