-
Notifications
You must be signed in to change notification settings - Fork 43
/
build-ctan.sh
executable file
·60 lines (56 loc) · 1.72 KB
/
build-ctan.sh
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
#! /usr/bin/env bash
# Copyright (C) 2016-2021 The Gregorio Project (see CONTRIBUTORS.md)
#
# This file is part of Gregorio.
#
# Gregorio is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Gregorio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
######################################################################
# Script to be executed by make ctan
VERSION=`head -1 .gregorio-version`
FILEVERSION=`echo $VERSION | sed 's/\./_/g'`
rm -rf ctan
mkdir -p ctan/gregoriotex/
mv gregoriotex.tds.zip ctan/gregoriotex.tds.zip
mv gregorio-$VERSION.tar.bz2 ctan/gregoriotex/
cd ctan/gregoriotex
tar xf gregorio-$VERSION.tar.bz2
rm gregorio-$VERSION.tar.bz2
cp ../../*.md .
cd gregorio-$VERSION
mv doc/ ../
mv tex/ ../
mv fonts/ ../
mv examples/ ../doc/
rm -rf macosx debian
cd ..
rm doc/Makefile*
rm doc/examples/Makefile*
rm tex/Makefile*
mkdir tex/lualatex
mkdir tex/luatex
mv tex/*.sty tex/lualatex
mv tex/*.* tex/luatex
rm fonts/Makefile*
mkdir fonts/sources/
mkdir fonts/truetype/
mv fonts/*.ttf fonts/truetype
mv fonts/*.* fonts/sources
cd gregorio-$VERSION
zip -r ../gregorio-$VERSION.zip * --exclude=*.DS_Store*
cd ..
rm -rf gregorio-$VERSION
cd ..
zip -r ../gregoriotex.ctan.zip gregoriotex gregoriotex.tds.zip --exclude=*.DS_Store*
cd ..
rm -rf ctan