diff options
Diffstat (limited to 'Build/tools/tpm-delete')
-rwxr-xr-x | Build/tools/tpm-delete | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Build/tools/tpm-delete b/Build/tools/tpm-delete new file mode 100755 index 00000000000..50ecab33e20 --- /dev/null +++ b/Build/tools/tpm-delete @@ -0,0 +1,33 @@ +#!/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` # Master/Tools + +Master=`cd $mydir/.. && 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 + + files=`./Tools/tpm-factory.pl \ + --master_dir=$Master --dest_dir=/tmp --ftp_dir=/tmp \ + --dry --remove --name=$type/$arg \ + | sed 's/^would unlink //'` + + p4 delete $files +done |