summaryrefslogtreecommitdiff
path: root/Build/tools/update-tpm
blob: 2d6abb1fd3a1908c2600e48e021dd36532686bfc (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# $Id$
# Public domain.  Originally written 2004, Karl Berry.
# 
# Regenerate the given set of tpm's using tpm-factory.

mydir=`dirname $0`
tools=`cd $mydir && pwd`
master=`cd $mydir/../../Master && pwd`

verbose=${OVERRIDE_VERBOSE-}

if test "x$1" = x--debug; then
  verbose=--debug
  shift
fi

test $# -eq 0 && set - TLCore Package Documentation

for type in "$@"; do
  case $type in
    TLCore) p=from; dir=texmf;;
    Package) p=auto; dir=texmf-dist;;
    Documentation) p=auto; dir=texmf-doc;;
    *) echo "$0: unknown type $type, one of TLCore, Package, Documentation.">&2
       exit 1;;
  esac
  
  cd $master/$dir/tpm || exit 1
  chmod a+rw * >&/dev/null # all files must be writable for tpm-factory.
  
  perl $tools/tpm-factory.pl $verbose \
       --master_dir=$master --ftp_dir=/tmp \
       --clean \
       --arch=all \
       --patterns=$p \
       --type=$type \
  | grep -v '^Writing '
done  
exit 0