-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpack
executable file
·75 lines (64 loc) · 1.89 KB
/
pack
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
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
echo ""
echo "Start this script from a copy of GAPDoc within the GAP root you want"
echo "to use for compiling the documentation. Also,"
echo "did you adjust (yN)?: Version, Date, ArchiveURL in ./PackageInfo.g"
echo " ./version"
echo " Date. copyright date, Version in doc/gapdoc.xml"
echo " example/example.xml"
echo ""
read -n 1 start
echo
if [ $start'X' != 'yX' ]; then
echo Ok, please adjust and try again.
exit 2
fi
# the GAP version to use for building documentation (with
# relative external links)
USEGAP=/usr/local/ca/gap-rsync
CDIR=`pwd`
dirnam=GAPDoc-`cat ./version`
cd /cache
mkdir -p gaptmp
cd gaptmp
rsync -av $USEGAP/ ./
cd pkg
rm -rf GAPDoc*
echo "Checking out current version into /cache/gaptmp/pkg/"$dirnam" . . ."
mkdir $dirnam
cd $dirnam
cp -a $CDIR/.git .
git co master .
echo "building documentation (twice for cross refs)"
echo "" | ../../gap -r -l "../..;" makedocrel.g
echo "" | ../../gap -r -l "../..;" makedocrel.g
echo "creating test files"
rm -rf tst
mkdir tst
echo "" | ../../gap -r -l "../..;" maketest.g
echo "removing unwanted files . . ."
rm -r pack TODO clean index.html pkgreadme.css
rm -rf .git .gitignore
rm -rf */*.{log,aux,blg,brf,bbl,idx,ilg,ind,pnr} */*.xml.bib */.cvsignore
rm -f ./makedoc.g ./maketxt ./doku toweb
echo "creating archive . . ."
cd ..
tar cf $dirnam.tar $dirnam
bzip2 -9 $dirnam.tar
echo Cleaning up
mv $dirnam.tar.bz2 $CDIR/
cd $CDIR
echo "Remove copy of GAP in /cache/gaptmp (y/n)?"
read -n 1 start
echo
if [ $start'X' == 'yX' ]; then
echo "Ok, removing ..."
rm -rf /cache/gaptmp
fi
echo New archive in ./$dirnam.tar.bz2
echo If ok then call
echo " repack.py "$dirnam".tar.bz2"
echo "If you are happy with this archive
#tag the current state before"
echo "use the ./toweb script to update the webpage."
echo "Then change version number back to '1.dev'."