summaryrefslogtreecommitdiff
path: root/fonts/gentium-tug/source/make-zip-4CTAN.sh
blob: 28ff5c5316fb5951929d9434b316640ba2f2ecbf (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
# This file is part of the Gentium package for TeX.
# It is licensed under the Expat License, see doc//README for details.

mydir=`cd \`dirname $0\` && pwd`

if test "x$1" = x-l || whoami | grep karl >/dev/null; then
  # i always forget
  local=true
else
  local=false
fi

rm -rf /tmp/gentium??????
#tmpdir=`mktemp -d /tmp/gentiumXXXXXX`
tmpdir=/tmp/gnt; rm -rf $tmpdir; mkdir $tmpdir
cd "$tmpdir" || exit 1

if $local; then
  TDS=`cd $mydir/../../.. && pwd`
else
  TDS="$tmpdir/TDS"
  svn co "http://svn.contextgarden.net/gentium/gentium/" "$TDS"
fi

pkgname=gentium-tug
(cd $TDS/doc/fonts/$pkgname && make clean)
(cd $TDS/source/fonts/$pkgname && make clean)

CTAN="$tmpdir/$pkgname"
mkdir -p "$CTAN/map" || exit 1

rsync="rsync -a --delete --exclude=**/.svn"
$rsync "$TDS/doc/fonts/$pkgname/"             "$CTAN/doc/" || exit 1
$rsync "$TDS/source/fonts/$pkgname/"          "$CTAN/source/"
$rsync "$TDS/tex/context/third/$pkgname/"     "$CTAN/context/"
$rsync "$TDS/tex/latex/$pkgname/"             "$CTAN/latex/"
$rsync "$TDS/fonts/afm/public/$pkgname/"      "$CTAN/afm/"
$rsync "$TDS/fonts/tfm/public/$pkgname/"      "$CTAN/tfm/"
$rsync "$TDS/fonts/truetype/public/$pkgname/" "$CTAN/truetype/"
$rsync "$TDS/fonts/type1/public/$pkgname/"    "$CTAN/type1/"
$rsync "$TDS/fonts/enc/dvips/$pkgname/"       "$CTAN/enc/"
$rsync "$TDS/fonts/map/dvips/$pkgname/"       "$CTAN/map/dvips/"
$rsync "$TDS/fonts/map/pdftex/$pkgname/"      "$CTAN/map/pdftex/"

printf "\f making .tds.zip:\n"
tdszip_dest=$tmpdir
(cd $TDS \
 && zip -qr $tdszip_dest/$pkgname.tds.zip [a-z]* -x \*.svn\*) # not README

printf "\f making combined zip for upload:\n"
ln -s doc/README $CTAN/README
(cd $tmpdir && zip -qry $tmpdir/$pkgname.zip *) # -y: keep README as symlink

# create a single .zip for upload that contains
#   a) $pkgname.tds.zip
#   b) $pkgname/ subdir for browsing
# because that's what CTAN wants these days.

if $local; then :; else
  echo
  echo "Please make sure that you have set"
  echo "    use-commit-times = yes"
  echo "in ~/.subversion/config"
  echo
fi

ls -l $tdszip_dest/$pkgname.tds.zip $tmpdir/$pkgname.zip