Оказывается ожидаем, что сделали свое дело.Вот что я закончил:
install-pear.sh
#!/usr/bin/expect
spawn wget -O /tmp/go-pear.phar http://pear.php.net/go-pear.phar
expect eof
spawn php /tmp/go-pear.phar
expect "1-11, 'all' or Enter to continue:"
send "\r"
expect eof
spawn rm /tmp/go-pear.phar
install-phpunit.sh
#!/bin/bash
./install-pear.sh
pear config-set preferred_state beta
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear install --alldeps phpunit/PHPUnit
Для запуска:
sudo apt-get install expect
chmod 744 ./install-pear.sh
chmod 744 ./install-phpunit.sh
sudo ./install-phpunit.sh