summaryrefslogtreecommitdiff
path: root/source/t/texlive/dump.unused.internal.libraries.from.sources.sh
blob: 11f775ed7d35a647cd53923eb1e57e5eff0b6be1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# Repacks the texlive tarball to remove unused sources.

VERSION=${VERSION:-$(echo texlive-*source.tar.?z* | rev | cut -f 2 -d - | cut -f 1 -d - | rev)}

tar xf texlive-${VERSION}-source.tar.xz || exit 1
mv texlive-${VERSION}-source.tar.xz texlive-${VERSION}-source.tar.xz.orig
( cd texlive-${VERSION}-source/libs && rm -rf cairo freetype2 gd gmp graphite2 harfbuzz mpfr icu libpng pixman potrace zlib )
( cd texlive-${VERSION}-source/utils && rm -rf asymptote )
( cd texlive-${VERSION}-source/texk && rm -rf dvisvgm )
( cd texlive-${VERSION}-source/texk/texlive && rm -rf w*_wrapper )
tar cf texlive-${VERSION}-source.tar texlive-${VERSION}-source
rm -r texlive-${VERSION}-source
xz texlive-${VERSION}-source.tar
touch -r texlive-${VERSION}-source.tar.xz.orig texlive-${VERSION}-source.tar.xz
rm texlive-${VERSION}-source.tar.xz.orig