#!/bin/bash

# This bash script builds everyting on an TravisCI Linux (Ubunutu) worker

set -ev

export UNATTENDED="--assume-yes"
export MAKE_PARALLEL="-j $(nproc)"

export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"

export PDF2HTMLEX_PREFIX=/usr/local

# Ensure all Apt packages are installed with no user interaction
#
export DEBIAN_FRONTEND=noninteractive

################
# do the build

./buildScripts/versionEnvs
./buildScripts/reportEnvs
./buildScripts/getBuildTools
./buildScripts/getDevLibraries
./buildScripts/getPoppler
./buildScripts/buildPoppler
./buildScripts/getFontforge
./buildScripts/buildFontforge
./buildScripts/buildPdf2htmlEX
./buildScripts/installPdf2htmlEX
#./buildScripts/createAppImage
#./buildScripts/createDockerImage
#./buildScripts/uploadGitHubRelease
#./buildScripts/uploadDockerImage
