0067d1
#! /bin/sh
0067d1
v=20200406
0067d1
s=texlive-$v-source.tar.xz
0067d1
p=${s%.tar.xz}
0067d1
0067d1
# get the texlive original source
0067d1
if [ ! -f $s ] ; then
0067d1
  echo download $s, please wait...
0067d1
  wget https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2020/$s
0067d1
  if [ ! -f $s ] ; then
0067d1
    echo download $s failed!
0067d1
    exit 1
0067d1
  fi
0067d1
fi
0067d1
# remove old source
0067d1
if [ -d $p ] ; then
0067d1
  rm -fr $p
0067d1
fi
0067d1
0067d1
echo extracting the $s...
0067d1
if ( ! tar Jxf $s ) ; then
0067d1
  echo $s failed, cannot be extracted
0067d1
  exit 1
0067d1
fi
0067d1
0067d1
# remove files with bad licenses, don't embeded zziplib but build with system lib
0067d1
rm -rf $p/libs/zziplib
0067d1
rm -rf $p/texk/ps2pk
0067d1
0067d1
# create clean texlive source
0067d1
echo create the clean texlive source, please wait...
0067d1
if ( tar Jcf $p-clean.tar.xz $p) ; then
0067d1
  echo clean texlive source $p-clean.tar.xz is created.
0067d1
else
0067d1
  echo failed, clean texlive source $p-clean.tar.xz cannot be created.
0067d1
fi