2018-02-26 03:30:22 +01:00
|
|
|
#!/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
|
2018-06-22 13:28:33 +02:00
|
|
|
find phar5 -type f -exec sed 's/\w* \.\.\./.../' -i {} +
|
2018-02-26 03:30:22 +01:00
|
|
|
|
|
|
|
php makephar.php phar5 madeline.phar $(cat .git/refs/heads/master)
|
|
|
|
|