File: strip-tetex-src

package info (click to toggle)
ptex-buildsupport 3.0-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 4,780 kB
  • ctags: 1
  • sloc: sh: 48; makefile: 38
file content (43 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
# by Masayuki Hatta. Public Domain.

if [ $# -eq 0 ]; then
  echo "$0: the name of teTeX source tarball(omit 'tar.gz') must be provided." >&2
  exit 1
fi
    

# The name of teTeX source tarball (omit ".tar.gz")
TARBALL_NAME="$1"

echo "Unpacking teTeX source tarball..."
tar xfz $TARBALL_NAME.tar.gz

echo "Get rid of unnecessary files/directories for building pTeX..."
rm -rf $TARBALL_NAME/utils
rm -rf $TARBALL_NAME/dialog
rm -rf $TARBALL_NAME/fixes
rm -rf $TARBALL_NAME/libs
rm -rf $TARBALL_NAME/patches
rm -rf $TARBALL_NAME/texinfo
rm -rf $TARBALL_NAME/texk/contrib
rm -rf $TARBALL_NAME/texk/djgpp
rm -rf $TARBALL_NAME/texk/dviljk
rm -rf $TARBALL_NAME/texk/dvipdfm
rm -rf $TARBALL_NAME/texk/dvipng
rm -rf $TARBALL_NAME/texk/dvipsk
rm -rf $TARBALL_NAME/texk/etc
rm -rf $TARBALL_NAME/texk/gsftopk
rm -rf $TARBALL_NAME/texk/makeindexk
rm -rf $TARBALL_NAME/texk/odvipsk
rm -rf $TARBALL_NAME/texk/oxdvik
rm -rf $TARBALL_NAME/texk/ps2pkm
rm -rf $TARBALL_NAME/texk/tetex
rm -rf $TARBALL_NAME/texk/xdvik

echo "Building stripped tarball..."
tar -cf $TARBALL_NAME-stripped.tar $TARBALL_NAME
gzip -9 $TARBALL_NAME-stripped.tar

rm -rf $TARBALL_NAME
echo "Done."