2013-11-07 18:27:35 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-06-17 03:14:31 +02:00
|
|
|
# This only requires the big texlive-$VERSION-texmf.tar.xz and
|
2013-11-07 18:27:35 +01:00
|
|
|
# texlive-$VERSION-extra.tar.xz tarballs to be present in $CWD
|
|
|
|
|
2014-06-17 03:14:31 +02:00
|
|
|
# If texlive.tlpdb is not present, it will have to be obtained from
|
2013-11-07 18:27:35 +01:00
|
|
|
# subversion (based on the # release date), e.g.
|
2014-06-17 03:14:31 +02:00
|
|
|
# svn co -r {20140525} svn://tug.org/texlive/trunk/Master/tlpkg
|
2013-11-07 18:27:35 +01:00
|
|
|
# You can then copy tlpkg/texlive.tlpdb to $CWD
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2014-06-17 03:14:31 +02:00
|
|
|
VERSION=20140525
|
2013-11-07 18:27:35 +01:00
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMF="$CWD/texlive-$VERSION-texmf";
|
|
|
|
|
2014-06-17 03:14:31 +02:00
|
|
|
if [ ! -e $CWD/texlive.tlpdb ] ; then
|
|
|
|
printf "\nYou need texlive.tlpdb in $CWD - get it here:\n"
|
|
|
|
printf "http://ftp.ctex.org/mirrors/CTAN/systems/texlive/tlnet/tlpkg/texlive.tlpdb\n\n"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-11-07 18:27:35 +01:00
|
|
|
rm -rf tmplists ; mkdir tmplists
|
|
|
|
|
|
|
|
# Initialize the texscyther db
|
|
|
|
texscyther --initdb
|
|
|
|
|
|
|
|
# Build a packaging list for all of the texmf stuff, but exclude docs and src
|
|
|
|
texscyther \
|
2014-06-17 03:14:31 +02:00
|
|
|
--tlpdb $CWD/texlive.tlpdb \
|
2013-11-07 18:27:35 +01:00
|
|
|
--nodirs \
|
|
|
|
--subset \
|
|
|
|
--include scheme-full \
|
|
|
|
--exclude scheme-full:doc scheme-full:src \
|
|
|
|
--output-plist tmplists/full
|
|
|
|
|
|
|
|
# Build a packaging list for the docs (bibarts is for DOS)
|
|
|
|
texscyther \
|
2014-06-17 03:14:31 +02:00
|
|
|
--tlpdb $CWD/texlive.tlpdb \
|
2013-11-07 18:27:35 +01:00
|
|
|
--nodirs \
|
|
|
|
--subset \
|
|
|
|
--include scheme-full:doc \
|
|
|
|
--exclude scheme-full:src bibarts \
|
|
|
|
--output-plist tmplists/docs
|
|
|
|
|
|
|
|
# Build a packaging list for the texmf sources
|
|
|
|
texscyther \
|
2014-06-17 03:14:31 +02:00
|
|
|
--tlpdb $CWD/texlive.tlpdb \
|
2013-11-07 18:27:35 +01:00
|
|
|
--nodirs \
|
|
|
|
--subset \
|
|
|
|
--include scheme-full:src \
|
2014-06-17 03:14:31 +02:00
|
|
|
--exclude bibarts \
|
2013-11-07 18:27:35 +01:00
|
|
|
--output-plist tmplists/src
|
|
|
|
|
|
|
|
# These next bits could probably be done using the --regex option passed to
|
|
|
|
# texscyther, but I already know how to do it this way :-)
|
|
|
|
|
|
|
|
# Filter some stuff out of texmf (build a ladder over UUOC if needed)
|
|
|
|
cat tmplists/full | \
|
|
|
|
grep "texmf-dist/" | \
|
|
|
|
grep -v "win32" \
|
|
|
|
> full-packlist
|
|
|
|
|
|
|
|
# Filter some stuff out of docs (use that ladder again)
|
|
|
|
cat tmplists/docs | \
|
|
|
|
grep "texmf-dist/" | \
|
|
|
|
grep -v "context/stubs/mswin/" | \
|
|
|
|
grep -v "win32" | \
|
|
|
|
grep -v "MinGW" \
|
|
|
|
> docs-packlist
|
|
|
|
|
|
|
|
# No filtering (for now) of src stuff
|
2014-06-17 03:14:31 +02:00
|
|
|
cat $CWD/tmplists/src | \
|
|
|
|
> $CWD/src-packlist
|
2013-11-07 18:27:35 +01:00
|
|
|
|
|
|
|
printf "Generating tarballs - please be patient...\n"
|
|
|
|
|
|
|
|
rm -rf $TMF
|
|
|
|
|
|
|
|
tar xf texlive-$VERSION-texmf.tar.xz
|
|
|
|
tar xf texlive-$VERSION-extra.tar.xz
|
|
|
|
mv texlive-$VERSION-extra/* $TMF && rmdir texlive-$VERSION-extra
|
|
|
|
|
|
|
|
rm -rf tarballs ; mkdir tarballs
|
|
|
|
|
|
|
|
printf "\tCreating tarballs/texlive-texmf-$VERSION.tar\n"
|
|
|
|
tar cf \
|
|
|
|
tarballs/texlive-texmf-$VERSION.tar \
|
|
|
|
-C $TMF \
|
|
|
|
-T full-packlist
|
|
|
|
|
|
|
|
printf "\tCreating tarballs/texlive-docs-$VERSION.tar\n"
|
|
|
|
tar cf \
|
|
|
|
tarballs/texlive-docs-$VERSION.tar \
|
|
|
|
-C $TMF \
|
|
|
|
-T docs-packlist
|
|
|
|
|
|
|
|
printf "\tCreating tarballs/texlive-src-$VERSION.tar\n"
|
|
|
|
tar cf \
|
|
|
|
tarballs/texlive-src-$VERSION.tar \
|
|
|
|
-C $TMF \
|
|
|
|
-T src-packlist
|
|
|
|
|
|
|
|
printf "Compressing tarballs - please be MOAR patient...\n"
|
|
|
|
xz -9 tarballs/*.tar
|
|
|
|
|
2014-06-17 03:14:31 +02:00
|
|
|
# Cleanup the leftovers
|
|
|
|
rm -rf tmplists $TMF {full,docs,src}-packlist *.db
|
|
|
|
|