2018-03-02 01:10:08 +01:00
|
|
|
#!/usr/bin/env bash
|
2018-03-02 02:08:10 +01:00
|
|
|
if ! php -r 'extension_loaded("bz2") or exit(1);' ; then
|
2018-03-02 01:42:48 +01:00
|
|
|
echo "You need to install (or enable) bz2 php extension"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-03-05 08:45:00 +01:00
|
|
|
composer global require 'humbug/php-scoper:^1.0@dev'
|
2018-03-02 01:10:08 +01:00
|
|
|
composer global require humbug/box:dev-master
|
|
|
|
composer install --no-dev
|
|
|
|
[ -d build ] || mkdir build
|
2018-03-02 01:16:10 +01:00
|
|
|
# increase FD limit, or Phar compression will fail
|
|
|
|
ulimit -Sn 4096
|
2018-03-05 08:45:00 +01:00
|
|
|
php -dphar.readonly=0 `which box` compile
|
2018-03-02 01:10:08 +01:00
|
|
|
|
|
|
|
# reinstall deps (to regenerate autoloader and bring back dev deps)
|
|
|
|
rm -Rf vendor/*
|
|
|
|
composer install
|