Only build docs if src/docs exists.
This commit is contained in:
parent
b5e34d56bf
commit
868d060656
|
@ -49,13 +49,21 @@ print_success "Done"
|
|||
|
||||
|
||||
|
||||
# Check that the default build operation runs; also, build and save the
|
||||
# documentation whilst we're at it
|
||||
do_cmd ./make.sh default docs || exit 1
|
||||
do_cmd mv html "../${PKGNAME}-doc" || exit 1
|
||||
# Check that the default build operation runs
|
||||
do_cmd ./make.sh || exit 1
|
||||
|
||||
|
||||
|
||||
# build and save the documentation, if required
|
||||
BUILD_DOCS=""
|
||||
[ -e src/docs ] && BUILD_DOCS="1"
|
||||
if [ ! -z ${BUILD_DOCS} ]
|
||||
then
|
||||
do_cmd ./make.sh docs || exit 1
|
||||
do_cmd mv html "../${PKGNAME}-doc" || exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Clean up
|
||||
do_cmd ./make.sh clean || exit 1
|
||||
do_cmd rm -rf .git || exit 1
|
||||
|
@ -65,11 +73,15 @@ do_cmd rm -rf .git || exit 1
|
|||
# Build archive, md5sum and signature
|
||||
cd ..
|
||||
tar c "${PKGNAME}" | bzip2 > "${PKGNAME}.tar.bz2"
|
||||
tar c "${PKGNAME}-doc" | bzip2 > "${PKGNAME}-doc.tar.bz2"
|
||||
sha1sum "${PKGNAME}.tar.bz2" > "${PKGNAME}.sha1"
|
||||
sha1sum "${PKGNAME}-doc.tar.bz2" > "${PKGNAME}-doc.sha1"
|
||||
gpg -a -b "${PKGNAME}.tar.bz2"
|
||||
gpg -a -b "${PKGNAME}-doc.tar.bz2"
|
||||
|
||||
if [ ! -z ${BUILD_DOCS} ]
|
||||
then
|
||||
tar c "${PKGNAME}-doc" | bzip2 > "${PKGNAME}-doc.tar.bz2"
|
||||
sha1sum "${PKGNAME}-doc.tar.bz2" > "${PKGNAME}-doc.sha1"
|
||||
gpg -a -b "${PKGNAME}-doc.tar.bz2"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue