-
Notifications
You must be signed in to change notification settings - Fork 10
/
mkdist
executable file
·61 lines (52 loc) · 1.52 KB
/
mkdist
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
#!/bin/sh
PNAME=Cairo
SWD=`pwd`
echo "Removing previous dist ..."
rm -rf /tmp/${PNAME}
echo "Copying package base ..."
cp -r ../${PNAME} /tmp
rm -f /tmp/${PNAME}/mkdist
cd /tmp/${PNAME}
if [ -e /tmp/${PNAME}/configure ]; then
echo "Note: autoreconf is *not* ran automatically if configure exists."
echo " Run it manually if necessary."
rm -rf /tmp/${PNAME}/autom4te*
else
echo "Running autoreconf ..."
autoreconf
rm -rf autom4te*
fi
echo "Removing SVN/CVS and backup stuff ..."
find . -name CVS -o -name .svn | xargs rm -rf
find . -name \*~ | xargs rm -f
echo "Updating version ..."
VER=`./version`
echo "$PNAME version ${VER}"
cat DESCRIPTION| sed "s/Version:.*/Version: ${VER}/" > d
mv d DESCRIPTION
# if -f is not specified, only free fonts are kept in the package
if test "$1" != "-f"; then
echo "Removing non-free fonts ..."
# cd inst/fonts
# rm -f ARIAL*.TTF
# we have a more general basefont.mapping now, no need to use this anymore
# if test -e "blue highway free.ttf"; then
# echo "blue highway free.ttf" > basefont.mapping
# if test -e "blue highway free bold.ttf"; then
# echo "blue highway free bold.ttf" >> basefont.mapping
# echo "blue highway free bold.ttf" >> basefont.mapping
# echo "blue highway free.ttf" >> basefont.mapping
# fi
# fi
# cd ../..
fi
# R CMD check doesn't like version ...
rm -f version
echo "Creating package ..."
cd ..
R CMD build ${PNAME}
cd ${SWD}
cp /tmp/${PNAME}_${VER}.tar.gz ..
rm -rf /tmp/${PNAME}
echo "Done."
ls -l ../${PNAME}_${VER}.tar.gz