File: build-distr

package info (click to toggle)
yap 5.1.1-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 16,124 kB
  • ctags: 14,650
  • sloc: ansic: 122,796; perl: 22,545; sh: 3,768; java: 1,277; makefile: 1,191; xml: 739; tcl: 624; lisp: 142; awk: 9
file content (54 lines) | stat: -rwxr-xr-x 1,169 bytes parent folder | download | duplicates (5)
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
#!/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/*