File: Catalogue-upd.sh

package info (click to toggle)
tetex-base 3.0.dfsg.3-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 239,540 kB
  • ctags: 10,610
  • sloc: xml: 103,461; perl: 9,398; ruby: 2,850; python: 1,551; php: 1,067; sh: 981; lisp: 494; makefile: 371; awk: 88
file content (26 lines) | stat: -rwxr-xr-x 648 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

umask 022
ctan=ftp.dante.de

: ${C=/t/ctan}

test -d $C/help/Catalogue || exit 1

rm -rf Catalogue
cp -a $C/help/Catalogue Catalogue
rm -rf Catalogue/*/*.xml Catalogue/support

sed 's@\.\./\.\./@'ftp://$ctan/pub/tex/@g < Catalogue/hier.html > Catalogue/hier.html-tmp$$
touch -r Catalogue/hier.html Catalogue/hier.html-tmp$$
rm -f Catalogue/hier.html
mv Catalogue/hier.html-tmp$$ Catalogue/hier.html

for i in Catalogue/*/*.html; do
  echo $i
  sed 's@\.\./\.\./\.\./@'ftp://$ctan/pub/tex/@g < $i > $i-tmp$$
  touch -r $i $i-tmp$$
  rm -f $i
  mv $i-tmp$$ $i
done
test -f Catalogue/index.html || ln -s catalogue.html Catalogue/index.html