3
#### make-dist: create an Intlfonts distribution tar file from the current
8
if [ ! -f README -o ! -d European ] ; then
9
echo "${prog}: Can't find README file or European subdirectory." >&2
10
echo "${prog} must be run in the top directory of the intlfonts" >&2
11
echo "distribution tree." >&2
15
version=`sed -n '1 s/.*International Fonts Ver\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/p' < README`
17
if [ -z "${version}" ] ; then
18
echo "${prog}: Header of README doesn't contain valid version number." >&2
22
files="README NEWS ChangeLog configure.in configure Makefile.in rmoldfnt.sh install-sh Emacs.ap make-dist"
23
subdirs="European European.BIG Asian Chinese Chinese.BIG Chinese.X\
24
Japanese Japanese.BIG Japanese.X Korean.X Ethiopic Misc\
26
sizes="14 16 18 24 32 40 48"
34
while [ $# -gt 0 ] ; do
36
## This option tells make-dist to make the new distribution normally,
37
## This will make a directory, for instance, intlfonts-1.1.
41
## This option tells make-dist to make an archive file
42
## (e.g. intlfonts-1.1.tar.gz) of the latest distribution.
46
## This option tells make-dist to make an splited archives files
47
## (e.g. intlfonts-1.1-split/Asian.tar.gz) of the latest distribution.
48
## This also enable `--dist'.
52
## This option tells make-dist to make a diff file
53
## (e.g. intlfonts-1.1-1.2.diff) between previous and latest
55
## This also enable `--dist'.
59
## This option tells make-dist to pack the latest files in this directory
60
## into intlfonts.tar.gz. This may be useful to move this directory to
62
## Note that old versions are not included in the packed file!
67
echo "${prog}: Unrecognized argument: $1" >&2
68
echo "The valid arguments are --dist, --arc, --diff, and --pack." >&2
75
if [ "${pack}" = "yes" ] ; then
76
echo "Packing the latest files in this directory into intlfonts.tar.gz..."
78
ln ${files} make-dist README.split intlfonts
79
for dir in ${subdirs}; do
80
mkdir intlfonts/${dir}
81
for file in ${dir}/*; do
82
if [ -f ${file} ] ; then
83
ln ${file} ${distdir}/${dir}
91
tar cfz intlfonts.tar.gz intlfonts
100
if [ "x$release" = "x" ] ; then
101
version=${major}.${minor}
103
version=${major}.${minor}.${release}
106
echo "The latest version is ${version}."
108
if [ "${dist}" = "no" -a "${arc}" = "no" -a "${diff}" = "no" ] ; then
109
echo "${prog}: Specify at least one of --dist, --arc, and --diff." >&2
113
distdir=intlfonts-${version}
115
## If the latest distribution directory is not yet created,
116
## create it for the arguments --arc, --split, and --diff.
117
if [ ! -d ${distdir} ] ; then
118
if [ "${arc}" = "yes" -o "${split}" = "yes" -o "${diff}" = "yes" ] ; then
123
if [ "${dist}" = "yes" ] ; then
124
if [ -d ${distdir} ] ; then
125
echo "${prog}: Directory ${distdir} already exists." >&2
129
echo "Creating the distribution directory ${distdir}..."
132
echo "Linking ${files}..."
133
ln ${files} ${distdir}
134
for dir in ${subdirs}; do
135
echo "Linking ${dir}..."
136
mkdir ${distdir}/${dir}
137
for file in ${dir}/*; do
138
if [ -f ${file} ] ; then
139
ln ${file} ${distdir}/${dir}
142
# ln ${dir}/README ${distdir}/${dir}
143
# ln ${dir}/*.bdf ${distdir}/${dir}
144
# if [ -f ${dir}/fonts.alias ] ; then
145
# ln ${dir}/fonts.alias ${distdir}/${dir}
150
if [ "${arc}" = "yes" ] ; then
151
echo "Making ${distdir}.tar.gz..."
153
tar cfz ${distdir}.tar.gz ${distdir}
154
echo "Contents of ${distdir}.tar.gz are:"
155
tar tfz ${distdir}.tar.gz
156
echo "Archive file ${distdir}.tar.gz is ready to be copied to ftp directory."
159
if [ "${split}" = "yes" ] ; then
160
echo "Making splitted archives files under ${distdir}-split..."
161
mkdir ${distdir}-split
162
cp README.split ${distdir}-split
163
for dir in ${subdirs}; do
164
echo "Making ${distdir}-split/${dir}.tar.gz..."
165
tar cfz ${distdir}-split/${dir}.tar.gz ${distdir}/${dir} \
166
`for f in ${files}; do echo ${distdir}/$f; done`
168
for size in ${sizes}; do
169
echo "Making ${distdir}-split/${size}dots.tar.gz..."
170
tar cfz ${distdir}-split/${size}dots.tar.gz ${distdir}/*/*${size}*.bdf \
171
`for f in ${files}; do echo ${distdir}/$f; done`
175
if [ "${diff}" = "yes" ] ; then
176
if [ ${minor} = "0" ] ; then
177
if [ ${major} = "1" ] ; then
178
echo "${prog}: There is no previous version." >&2
181
prev_major=`expr ${major} - 1`
182
# Find the previous greatest minor version.
184
for dir in intlfonts-${prev_major}.*; do
185
this=`echo ${dir} | sed 's/intlfonts-[0-9][0-9]*\.\([0-9][0-9]*\)/\1/`
186
if [ ${this} -gt ${prev_minor} ] ; then prev_minor=${this}; fi
190
prev_minor=`expr ${minor} - 1`
192
prev_version=${prev_major}.${prev_minor}
193
prevdir=intlfonts-${prev_version}
194
diff_file=intlfonts-${prev_version}-${version}.diff
195
echo "Making ${diff_file}..."
197
if [ ! -d ${prevdir} ] ; then
198
echo "${prog}: Directory ${prevdir} does not exist." >&2
202
diff -acrN ${prevdir} ${distdir} > ${diff_file}
206
### make-dist ends here