blob: f97b66d73a1104c856a5c459ff39a23d3605dd9a (
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
41
42
43
44
45
46
|
#!/bin/sh
# $Id: //depot/Master/Tools/tpm-delete#1 $
# Public domain. Originally written 2005, Karl Berry.
#
# Delete a tpm and the files it references from the repository.
# Takes just the package name, no .tpm suffix, no type, no subdirs.
mydir=`dirname $0`
mydir=`cd $mydir && pwd`
Master=`cd $mydir/../../Master && pwd`
cd $Master || exit 1
for arg in "$@"; do
file="$arg.tpm"
if test -r texmf-dist/tpm/$arg.tpm; then
type=Package
elif test -r texmf/tpm/$arg.tpm; then
type=TLCore
elif test -r texmf-doc/tpm/$arg.tpm; then
type=Documentation
else
echo "$0: cannot find $file, goodbye." >&1
exit 1
fi
# this removes the files. we write out the directory names.
$mydir/tpm-factory.pl --debug \
--master_dir=$Master --dest_dir=/tmp --ftp_dir=/tmp \
--remove --name=$type/$arg \
| sed -e 's/unlinked/svn rm /' \
-e 's,/[^/]*$,,' \
-e "s,/tpm\$,/tpm/$1.tpm," \
>/tmp/tpmrm
sort -u -o /tmp/tpmrm /tmp/tpmrm
sh /tmp/tpmrm
# now transform into directory list for later svn commit.
sed 's/^svn rm //' /tmp/tpmrm >/tmp/tldel.dirs
# edit a collection-* file by hand.
echo $Master/texmf/tpm >>/tmp/tldel.dirs
# leave svn commit to be done by hand for this time.
done
|