comparison bin/pub @ 0:2aa53823fb21

new repo
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Sat, 06 Jun 2026 10:19:04 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2aa53823fb21
1 #!/bin/sh
2 if [ '-?' = "$1" ]
3 then
4 shift
5 fi
6 if [ '-a' = "$1" ]
7 then
8 shift
9 ENC=!encoding=US-ASCII
10 else
11 ENC=
12 fi
13 if [ '-f' = "$1" ]
14 then
15 shift
16 if [ '-l' = "$1" ]
17 then
18 shift
19 LL="$1"
20 shift
21 else
22 LL=.
23 if [ ! -r "srr2.png" ]
24 then
25 cp -a /home/ht/Documents/HTalks/Icons/{srr2,24px-Cc-*}.png .
26 fi
27 fi
28 SS="file:///d:/lib/xml/doc.xsl license=$LL/"
29 AA=
30 else
31 SS=
32 AA=-a
33 fi
34 if [ '-d' = "$1" ]
35 then
36 shift
37 DIR="$1"
38 shift
39 fi
40 if [ '' = "$1" ]
41 then
42 echo "Usage: pub [-a] [-f [-l license-icon-dir]] [-p dir] fileroot [destroot]"
43 else
44 dest=${2:-$1}.html
45 saxon92 $AA $1.xml $SS $ENC > $dest
46 Echo "now psav msg fileroot"
47 fi
48 if [ "$DIR" ]
49 then
50 echo -n uploading to public_html/$DIR . . .
51 lxprintf -e '*[@href|@src]' '%s\n' '@href|@src' $dest | egrep '^./|^[^/]*$' | \
52 xargs tar -czf - $dest | goE "/home/ht/share/bin/install-stdin $DIR"
53 echo
54 uploading to public_html/$DIR . . . done
55 fi