-
Notifications
You must be signed in to change notification settings - Fork 17
/
build-distr
54 lines (50 loc) · 1.14 KB
/
build-distr
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
#!/bin/bash
#
# small but nasty script to build a new YAP release from the current
# directory: it first builds a new tar file, next creates
# rpms, and last creates a new web page directory.
#
YAP_DIR=`pwd`
PAGE_DIR=~vitor/lpublic_html/Yap/Yap4.3
OWNER=vitor
parent=$(cd ..;pwd)
version=${PWD##$parent/}
splat() {
rm -f core
for i in *.tex; do
rm -f ${i%.tex}.aux
rm -f ${i%.tex}.log
rm -f ${i%.tex}.dvi
rm -f ${i%.tex}.bbl
rm -f ${i%.tex}.blg
# get rid of outputs from original file.
rm -f ${i%.tex}.ps
done
rm -f *~
rm -f *.BAK
rm -f \#*\#
}
. distribute --small
cp $YAP_DIR/../"$version".tar.gz $PAGE_DIR/"$version"-small.tar.gz
cd /usr/src/RPM/SPECS
cp $YAP_DIR/misc/Yap.spec .
mv $YAP_DIR/../"$version".tar.gz ../SOURCES
rpm -ba Yap.spec
cd /usr/src/RPM
mv SRPMS/Yap* $PAGE_DIR
mv RPMS/*/Yap* $PAGE_DIR
rm -rf BUILD/Yap*
rm -rf SOURCES/Yap*
rm -rf SPECS/Yap*
cd $YAP_DIR
# get rid of silly $1
shift
. distribute
mv -f $YAP_DIR/../"$version".tar.gz $PAGE_DIR
cp -f $YAP_DIR/changes4.3.html $PAGE_DIR
cd $YAP_DIR/docs
make html
cd $YAP_DIR
cp -f $YAP_DIR/docs/*.html $PAGE_DIR
chown $OWNER $PAGE_DIR/*
chmod 666 $PAGE_DIR/*