summaryrefslogtreecommitdiff
path: root/makezip.sh
blob: 3c94f8e4e9f21f819fd0cc7fc8bf7b3a310473ec (plain)
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
export SPECDOC=${SPECDOC:-`cat REVISION`}
export DATESTR=${DATESTR:-`cat REVISION-DATE`}
rm -f $SPECDOC.zip
if test -d .git; then
	git archive --format=zip --prefix=tex/ -o $SPECDOC.zip HEAD
elif test -d .svn; then
	rm -fr export-from-svn
	mkdir -p export-from-svn
	svn export . export-from-svn/tex
	cd export-from-svn/
	zip ../$SPECDOC.zip tex/
	cd ..
else
	echo Neither .git nor .svn found.
	echo Falling back to generated list.
fi
zip -d $SPECDOC.zip tex/.gitattributes
rm -fr listings
mkdir -p listings
cp virtio-queue.h listings/virtio_queue.h
zip $SPECDOC.zip listings/virtio_queue.h
rm -fr tmpfilesforzip
mkdir -p tmpfilesforzip/tex
echo "$SPECDOC" > tmpfilesforzip/tex/REVISION
echo "$DATESTR" > tmpfilesforzip/tex/REVISION-DATE
cd tmpfilesforzip
zip ../$SPECDOC.zip tex/*