summaryrefslogtreecommitdiff
path: root/Master/Tools/update-tpm
blob: e47ae77354cdc8b11f90b4f61584dccb56bb44f1 (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: //depot/Master/Tools/update-tpm#4 $ $Date: 2005/10/08 $ $Author: karl $
# Public domain.  Originally written 2004, Karl Berry.
# 
# Regenerate the given set of tpm's using tpm-factory.

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

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