From 14f74d141ab5580688bfd46d2f74c026e43ed967 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 1 Apr 2015 06:11:44 +0200 Subject: Update to MediaWiki 1.24.2 --- tests/phpunit/install-phpunit.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/phpunit/install-phpunit.sh (limited to 'tests/phpunit/install-phpunit.sh') diff --git a/tests/phpunit/install-phpunit.sh b/tests/phpunit/install-phpunit.sh new file mode 100644 index 00000000..022f998e --- /dev/null +++ b/tests/phpunit/install-phpunit.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +has_binary () { + if [ -z `which $1` ]; then + return 1 + fi + return 0 +} + +if [ `id -u` -ne 0 ]; then + echo '*** ERROR: Must be root to run' + exit 1 +fi + +if ( has_binary phpunit ); then + echo PHPUnit already installed +else if ( has_binary pear ); then + echo Installing phpunit with pear + pear channel-discover pear.phpunit.de + pear channel-discover components.ez.no + pear channel-discover pear.symfony.com + pear update-channels + #Temporary fix for 64597 + pear install --alldeps phpunit/PHPUnit-3.7.35 +else if ( has_binary apt-get ); then + echo Installing phpunit with apt-get + apt-get install phpunit +else if ( has_binary yum ); then + echo Installing phpunit with yum + yum install phpunit +else if ( has_binary port ); then + echo Installing phpunit with macports + port install php5-unit +fi +fi +fi +fi +fi -- cgit v1.2.3-54-g00ecf