#!/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