|
0
|
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
uploading to public_html/$DIR . . . done
|
|
|
54 fi
|