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
|
#!/bin/sh
set -e
PACKAGE=khronos-opencl-man
VERSION=${VERSION:-$2}
TARFILE=${TARFILE:-$3}
if [ -z ${VERSION}]; then
VERSION=`dpkg-parsechangelog | sed -n -e 's/^Version: \(.*\)-[^-]*$/\1/p'`
fi
REVISION=`echo $VERSION | sed -e 's/^.*svn//g'`
if [ -z ${TARFILE}]; then
TARFILE=${PACKAGE}_${VERSION}.orig.tar.gz
fi
FOLDER=${PACKAGE}-${VERSION}
URL=https://cvs.khronos.org/svn/repos/registry/trunk/public/cl/sdk/1.2/docs/man
svn export --quiet --revision ${REVISION} ${URL} ${FOLDER}
# we will re-generate them anyway:
find ${FOLDER}/xhtml -name \*.html -not -name index.html -not -name Opencl_header.html -not -name Opencl_tofc.html -not -name oclRefPages-Title.html -delete
URL2=https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/man4
cd ${FOLDER}
svn export --quiet $URL2/Makefile
svn export --quiet $URL2/usr
cd ..
GZIP="--best --no-name" tar --exclude-vcs -czf ${TARFILE} ${FOLDER}
rm -rf ${FOLDER}
|