1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-11 17:19:38 +01:00
MadelineProto/tests/conversion/after-5.sh

21 lines
1015 B
Bash
Raw Normal View History

2019-12-26 22:02:36 +01:00
#!/bin/bash -e
2019-12-26 19:47:24 +01:00
sed 's/^Loop::set.*;//g' -i vendor/amphp/amp/lib/Loop.php
echo 'Loop::set((new DriverFactory())->create());' >> vendor/amphp/amp/lib/Loop.php
cp $(dirname $0)/../random.php vendor/paragonie/random_compat/lib/random.php
2023-01-27 14:20:47 +01:00
cp vendor/danog/madelineproto/src/Coroutine.php vendor/amphp/amp/lib/Coroutine.php
2019-12-26 19:47:24 +01:00
sed 's/namespace danog\\MadelineProto;/namespace Amp;/g' -i vendor/amphp/amp/lib/Coroutine.php
2023-01-27 14:20:47 +01:00
sed 's/public static function echo/public static function echo_/g' -i vendor/danog/madelineproto/src/Tools.php
2019-12-26 19:47:24 +01:00
sed 's/use Kelunik\\Certificate\\Certificate/use Kelunik\Certificate\Certificate as _Certificate/g;s/new Certificate/new _Certificate/g;s/empty[(]\$metadata[)] [?] null : //g' -i vendor/amphp/socket/src/TlsInfo.php
echo "<?php
namespace League\Uri\Contracts;
interface UriException
{
}" > vendor/league/uri-interfaces/src/Contracts/UriException.php
find vendor/amphp -type f -name '*.php' -exec sed "s/extension_loaded[(]'zlib'[)]/false/g;s/new[(]/new_(/g;s/clone[(]/clone_(/g" -i {} +