From 8821ace90a48ca2d2ae8f95d7135c211a5295c04 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Sat, 23 Oct 2010 16:05:02 +0000 Subject: [PATCH] Initial check in for install script for PHPunit --- maintenance/tests/phpunit/install-phpunit.sh | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 maintenance/tests/phpunit/install-phpunit.sh diff --git a/maintenance/tests/phpunit/install-phpunit.sh b/maintenance/tests/phpunit/install-phpunit.sh new file mode 100755 index 0000000000..208b975a52 --- /dev/null +++ b/maintenance/tests/phpunit/install-phpunit.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +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 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 pear ); then + echo Installing phpunit with pear + pear channel-discover pear.phpunit.de + pear install phpunit/PHPUnit +fi +fi +fi +fi -- 2.20.1