summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/ctan2tl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/bin/ctan2tl')
-rwxr-xr-xMaster/tlpkg/bin/ctan2tl27
1 files changed, 15 insertions, 12 deletions
diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl
index 5db1d382e01..1ab90ae47ed 100755
--- a/Master/tlpkg/bin/ctan2tl
+++ b/Master/tlpkg/bin/ctan2tl
@@ -7,18 +7,20 @@
#
# Basic usage: ctan2tl TLPKGNAME
# --place to include final `place' invocation (repository adds/removes).
-# --no-ctan if already have files in ../cdbuild/raw/PKG.
+# --no-ctan if already have files in Build/tmp.raw/PKG.
# Unlikely to work without GNU utilities.
#
# This does not actually commit anything to the repository. Without
# --place, it doesn't even create any files in the repository outside of
-# cdbuild/{raw,cooked}.
+# Build/tmp.{raw,cooked}.
unset CDPATH # avoid extraneous output
mydir=`cd \`dirname $0\` && pwd` # Master/tlpkg/bin
+PATH=$mydir:$PATH # we call lots of our other tools
+
Build=`cd $mydir/../../../Build && pwd`
-raw=$Build/cdbuild/raw
+raw=$Build/tmp.raw
test -d $raw || mkdir $raw
cd $raw || exit 1
@@ -52,7 +54,7 @@ echo "$0: is $ctan_dir1"
if $copy_from_ctan; then
-# remove whatever old stuff we might have.
+# remove whatever dregs in raw that might be lying around.
rm -rf $pkg
# An important special case: the latex-tds project contains tds-ready
@@ -103,19 +105,20 @@ fi # end of copying from CTAN.
#
printf "\n$0: calling ctan2tds\n"
-rm -rf ../cooked/$pkg
-test -d ../cooked || mkdir ../cooked
-../ctan2tds.pl --ctan-dir=$ctan_dir1 $pkg || exit 1
+cooked=$Build/tmp.cooked
+rm -rf $cooked/$pkg
+test -d $cooked || mkdir $cooked
+ctan2tds --ctan-dir=$ctan_dir1 $pkg || exit 1
-cd ../cooked || exit 1
+cd $cooked || exit 1
printf "\n\f cooked\n"
-find -depth -type d | xargs rmdir 2>/dev/null
+find -depth -type d | xargs rmdir 2>/dev/null # remove empty directories
find $pkg \! -type d -printf "%TY%Tm%Td.%TH%TM %p\n" | sort -r +1
-printf "\n$0: calling place $place_chicken\n"
+printf "\n$0: calling place $place_chicken $pkg\n"
rm -rf $pkg.done
-../place $place_chicken $pkg
+place $place_chicken $pkg
status=$?
-rm -rf ../raw/$pkg
+rm -rf $raw/$pkg
exit $status