MOON
Server: Apache
System: Linux u18017238.onlinehome-server.com 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User: emblazeone (1003)
PHP: 7.3.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/emblazeone/public_html/mantis/scripts/travis_script.sh
#!/bin/bash -e
# -----------------------------------------------------------------------------
# MantisBT Travis-CI test script execution
# -----------------------------------------------------------------------------


# -----------------------------------------------------------------------------
# Install toolchain and build docbooks if they have been modified
#
function build_docbook() {

	# Get the list of modified docbooks from the commit range
	UPDATED_DOCBOOKS=$(
		git diff --name-only $TRAVIS_COMMIT_RANGE -- docbook/ |
		grep -i '\.xml$' |
		cut -d '/' -f 2 |
		sort -u
	)

	# Build the docbook if any XML files have been updated
	if [[ -n $UPDATED_DOCBOOKS ]]
	then
		# Install DocBook toolchain
		echo "Installing Publican..."
		sudo apt-get install publican

		# Build the books
		for BOOK in $UPDATED_DOCBOOKS
		do
			echo
			echo "Building '$BOOK'..."
			cd $TRAVIS_BUILD_DIR/docbook/$BOOK
			make
		done
	else
		echo "No documentation changes in $TRAVIS_COMMIT_RANGE"
	fi
}


# -----------------------------------------------------------------------------
# Main block
#
if [[ -z $DOCBOOK ]]
then
	echo "Executing MantisBT test scripts..."
	phpunit --bootstrap ./tests/bootstrap.php ./tests/AllTests.php
else
	echo "Building DocBook..."
	build_docbook
fi