summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2017-07-15 13:00:54 +0000
committerNorbert Preining <preining@logic.at>2017-07-15 13:00:54 +0000
commitc5a1e0d44e2bd4121dc90a8ca835f2b73760eba4 (patch)
tree2274598298940ee6c4d853543817b8ffc21f3f5e /Master/tlpkg
parent132eb754668558473101fb9d129a239bd31246ab (diff)
work on supporting tlcontrib in ctan2tl
git-svn-id: svn://tug.org/texlive/trunk@44807 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rwxr-xr-xMaster/tlpkg/bin/ctan2tl67
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds3
-rwxr-xr-xMaster/tlpkg/libexec/place9
3 files changed, 57 insertions, 22 deletions
diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl
index f392fbc053d..3289723e0cb 100755
--- a/Master/tlpkg/bin/ctan2tl
+++ b/Master/tlpkg/bin/ctan2tl
@@ -11,11 +11,6 @@ mydir=`cd \`dirname $0\` && pwd` # Master/tlpkg/bin
libexec=`cd $mydir/../libexec && pwd` # Master/tlpkg/libexec
PATH=$mydir:$libexec:$PATH # we call lots of our other tools
-Build=`cd $mydir/../../../Build && pwd`
-raw=$Build/tmp.raw
-test -d $raw || mkdir $raw
-cd $raw || exit 1
-
if test "x$1" = x--help; then
echo "Usage: $0 [--place] [--no-ctan] TLPKGNAME"
echo
@@ -36,19 +31,49 @@ if test "x$1" = x--help; then
exit 0
fi
-if test "x$1" = x--place || test "x$1" = x-p; then
- place_chicken=
- shift
-else
- place_chicken=-n
+place_chicken=
+copy_from_ctan=true
+contrib_ctan2tds_arg=
+contrib_place_arg=
+while true; do
+ case "$1" in
+ '-p'|'--place')
+ place_chicken=
+ shift
+ continue
+ ;;
+ '--no-ctan')
+ copy_from_ctan=false
+ shift
+ continue
+ ;;
+ '--contrib')
+ do_contrib=true
+ contrib_ctan2tds_arg=--contrib
+ contrib_place_arg=--contrib
+ shift
+ continue
+ ;;
+ '--buildplace')
+ shift
+ Build=$1
+ shift
+ continue
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+if [ "x$Build" = "x" ] ; then
+ Build=`cd $mydir/../../../Build && pwd`
fi
-if test "x$1" = x--no-ctan; then
- copy_from_ctan=false
- shift
-else
- copy_from_ctan=true
-fi
+raw=$Build/tmp.raw
+test -d $raw || mkdir $raw
+cd $raw || exit 1
+
pkg=$1
if test -z "$pkg"; then
@@ -77,13 +102,13 @@ if egrep " $pkg"'( |$)' $mydir/tlpkg-ctan-check >/dev/null; then :; else
echo
echo "*** $0: $pkg not in $mydir/tlpkg-ctan-check, add?"
fi
-
+
if grep "^depend *$pkg\$" $mydir/../tlpsrc/collection-* >/dev/null; then :
else
echo
echo "*** $0: $pkg not in any collection, add?"
fi
-
+
#
if $copy_from_ctan; then
@@ -123,7 +148,7 @@ printf "\n$0: calling ctan2tds\n"
cooked=$Build/tmp.cooked
rm -rf $cooked/$pkg
test -d $cooked || mkdir $cooked
-ctan2tds --ctan-dir=$ctan_dir $pkg || exit 1
+ctan2tds --ctan-dir=$ctan_dir $contrib_ctan2tds_arg $pkg || exit 1
cd $cooked || exit 1
printf "\n\f cooked\n"
@@ -145,9 +170,9 @@ find $pkg \( -name .svn \) -prune -o -print | sort -f | uniq -i -d >&2
find $pkg \! -type d -printf "%TY%Tm%Td.%TH%TM %p\n" | sort -k2 \
| tee ${TMPDIR-/tmp}/ctan2tl.files
-printf "\n$0: calling place $place_chicken $pkg\n"
+printf "\n$0: calling place $place_chicken $contrib_place_arg $pkg\n"
rm -rf $pkg.done
-place $place_chicken $pkg
+place $place_chicken $contrib_place_arg $pkg
status=$?
$copy_from_ctan && rm -rf $raw/$pkg
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 59de6a16cbe..e7b7773c851 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -3038,6 +3038,7 @@ exit 2 unless Getopt::Long::GetOptions (
"debug!",
"help",
"test|n!",
+ "contrib",
"version",
);
@@ -6404,7 +6405,7 @@ sub readconfig {
sub nonfree_die {
my ($diestr, $cmd) = @_;
- if ($ENV{'CTAN2TDS_NONFREE'}) {
+ if ($opt_contrib) {
eval $cmd;
} else {
die $diestr;
diff --git a/Master/tlpkg/libexec/place b/Master/tlpkg/libexec/place
index eb79f35bb0a..dda37b0d2c8 100755
--- a/Master/tlpkg/libexec/place
+++ b/Master/tlpkg/libexec/place
@@ -30,6 +30,13 @@ if ($ARGV[0] eq "-n") {
}
print "place: chicken mode = $chicken\n";
+my $do_contrib = 0;
+if ($ARGV[0] eq "--contrib") {
+ $do_contrib = 1;
+ shift;
+}
+
+
die "usage: $0 PKGNAME\n" unless @ARGV == 1;
$package = $ARGV[0];
# $::opt_verbosity = 3; # debug tlpdb reading
@@ -94,6 +101,8 @@ for my $dot (@trailingdots) {
# we do those checks (and possible removals) before making the new TL
# package, so the "README." file doesn't get into the data structures.
+die("contrib mode not implemented, move packages manually!\n") if ($do_contrib);
+
if (-d "Master") { # maybe have both Build and Master
&xchdir ("Master");