MadelineProto/tests/makephardebug.sh

38 lines
904 B
Bash
Executable File

#!/bin/bash -e
composer global require spatie/7to5
[ -f $HOME/.composer/vendor/bin/php7to5 ] && php7to5=$HOME/.composer/vendor/bin/php7to5
[ -f $HOME/.config/composer/vendor/bin/php7to5 ] && php7to5=$HOME/.config/composer/vendor/bin/php7to5
rm -rf phar7 phar5 MadelineProtoPhar
mkdir phar7
cd phar7
echo '{
"name": "danog/madelineprototests",
"minimum-stability":"dev",
"require": {
"danog/madelineproto": "dev-master"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/danog/phpseclib"
}
],
"authors": [
{
"name": "Daniil Gentili",
"email": "daniil@daniil.it"
}
]
}' > composer.json
composer update
cp -a ../src vendor/danog/madelineproto
cd ..
$php7to5 convert --copy-all phar7 phar5 >/dev/null
php makephar.php phar5 madeline.phar $(cat .git/refs/heads/master)