script - Update Doxygen build to only run if cached binary not found

This commit is contained in:
thephez 2018-02-05 13:09:26 -05:00
parent 9b8e4593cb
commit 88c67fcc29

View file

@ -1,28 +1,39 @@
#!/bin/sh #!/bin/sh
set -ex set -ex
# Build instructions from: https://www.stack.nl/~dimitri/doxygen/download.html file="$TRAVIS_BUILD_DIR/doxygen-install/doxygen"
echo "Cloning doxygen repository..."
git clone https://github.com/doxygen/doxygen.git doxygen-src
cd doxygen-src # Only build Doxygen if the binary isn't found
if [ -f "$file" ]
then
echo "Doxygen binary found. Skipping build."
else
# Use v1.8.14 (2f4139de014bf03898320a45fe52c92872c1e0f4) echo "Doxygen binary not found. Building form source..."
git checkout 2f4139de014bf03898320a45fe52c92872c1e0f4 .
echo "Create build folder..." # Build instructions from: https://www.stack.nl/~dimitri/doxygen/download.html
mkdir build echo "Cloning doxygen repository..."
cd build git clone https://github.com/doxygen/doxygen.git doxygen-src
echo "Make..." cd doxygen-src
cmake -G "Unix Makefiles" ..
make
echo "Done building doxygen..." # Use v1.8.14 (2f4139de014bf03898320a45fe52c92872c1e0f4)
./bin/doxygen -v git checkout 2f4139de014bf03898320a45fe52c92872c1e0f4 .
echo "Copy Doxygen binary to folder for caching..." echo "Create build folder..."
mkdir -p $TRAVIS_BUILD_DIR/doxygen-install mkdir build
cp bin/doxygen $TRAVIS_BUILD_DIR/doxygen-install/ cd build
cd $TRAVIS_BUILD_DIR echo "Make..."
cmake -G "Unix Makefiles" ..
make
echo "Done building doxygen..."
./bin/doxygen -v
echo "Copy Doxygen binary to folder for caching..."
mkdir -p $TRAVIS_BUILD_DIR/doxygen-install
cp bin/doxygen $TRAVIS_BUILD_DIR/doxygen-install/
cd $TRAVIS_BUILD_DIR
fi