2013-11-07 18:27:35 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-08-24 20:15:34 +02:00
|
|
|
# This requires the texlive-$VERSION-texmf.tar.xz (large) and
|
2013-11-07 18:27:35 +01:00
|
|
|
# texlive-$VERSION-extra.tar.xz tarballs to be present in $CWD
|
2014-08-24 20:15:34 +02:00
|
|
|
# ftp://tug.org/historic/systems/texlive/2014/texlive-20140525-texmf.tar.xz
|
|
|
|
# ftp://tug.org/historic/systems/texlive/2014/texlive-20140525-extra.tar.xz
|
2013-11-07 18:27:35 +01:00
|
|
|
|
2014-08-24 20:15:34 +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
|
|
|
|
2014-08-24 20:15:34 +02:00
|
|
|
pkglist=${pkglist:-"texmf-tetexish texmf-extra texmf-docs texmf-src"}
|
|
|
|
|
2013-11-07 18:27:35 +01:00
|
|
|
CWD=$(pwd)
|
2014-08-24 20:15:34 +02:00
|
|
|
TMP=${TMP:-$CWD/tmplists}
|
|
|
|
PACKLISTS=${PACKLISTS:-$CWD/packlists}
|
|
|
|
TARBALLS=${TARBALLS:-$CWD/tarballs}
|
|
|
|
|
|
|
|
export CWD TMP PACKLISTS TARBALLS
|
|
|
|
|
2013-11-07 18:27:35 +01:00
|
|
|
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"
|
2014-08-24 20:15:34 +02:00
|
|
|
printf "http://harrier.slackbuilds.org/texlive-2014/texscythe/contrib/texlive.tlpdb\n\n"
|
|
|
|
exit 1
|
2014-06-17 03:14:31 +02:00
|
|
|
fi
|
|
|
|
|
2014-08-24 20:15:34 +02:00
|
|
|
printf "\nMaking these tarballs: $pkglist\n\n" ; sleep 2
|
|
|
|
|
|
|
|
rm -rf $TMP $PACKLISTS
|
|
|
|
mkdir -p $TMP $PACKLISTS
|
2013-11-07 18:27:35 +01:00
|
|
|
|
|
|
|
# Initialize the texscyther db
|
2014-08-24 20:15:34 +02:00
|
|
|
if [ ! -r $CWD/$CWD/texscythe.db ]; then
|
|
|
|
texscyther --initdb --sqldb $CWD/texscythe.db
|
|
|
|
fi
|
|
|
|
|
|
|
|
for pkg in $(printf "$pkglist") ; do ./helpers/$pkg ; done
|
|
|
|
|
|
|
|
if [ ! -d $TMF ]; then
|
|
|
|
printf "Extracting sources to create tarballs - please be patient...\n"
|
|
|
|
tar xf texlive-$VERSION-texmf.tar.xz
|
|
|
|
tar xf texlive-$VERSION-extra.tar.xz
|
|
|
|
mv texlive-$VERSION-extra/* $TMF && rmdir texlive-$VERSION-extra
|
|
|
|
fi
|
|
|
|
|
|
|
|
printf "Creating tarballs - please be moar patient...\n"
|
|
|
|
rm -rf $TARBALLS ; mkdir -p $TARBALLS
|
|
|
|
|
|
|
|
for pkg in $(printf "$pkglist") ; do \
|
|
|
|
printf "\tCreating $TARBALLS/texlive-$pkg-$VERSION.tar\n"
|
|
|
|
tar cf $TARBALLS/texlive-$pkg-$VERSION.tar -C $TMF \
|
|
|
|
-T $PACKLISTS/$pkg-packlist
|
|
|
|
done
|
2013-11-07 18:27:35 +01:00
|
|
|
|
|
|
|
printf "Compressing tarballs - please be MOAR patient...\n"
|
2014-08-24 20:15:34 +02:00
|
|
|
xz -9 $TARBALLS/*.tar
|
2013-11-07 18:27:35 +01:00
|
|
|
|
2014-06-17 03:14:31 +02:00
|
|
|
# Cleanup the leftovers
|
2014-08-24 20:15:34 +02:00
|
|
|
rm -rf $TMP $PACKLISTS #$TMF #leave TMF for now
|
2014-06-17 03:14:31 +02:00
|
|
|
|