From a219e590de1ec4e45a06aa5fc07253ec37a8563d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Bebi=C4=87=E2=80=AE?= Date: Tue, 9 Apr 2024 13:34:43 +0200 Subject: [PATCH] add rename script --- rename.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 rename.py diff --git a/rename.py b/rename.py new file mode 100644 index 0000000000..cbf8ad9dbf --- /dev/null +++ b/rename.py @@ -0,0 +1,27 @@ +import glob +import os +from tqdm import tqdm + +for filename in tqdm(glob.glob("./**", recursive=True)): + if os.path.isdir(filename): + continue + + if filename == "./rename.py": + continue + + with open(filename, "rb") as f: + content = f.read() + + newContent = content.replace( + b"github.com/ethereum/go-ethereum", + b"github.com/tenderly/binance-geth", + ) + + newContent = newContent.replace( + b"github.com/tenderly/binance-geth/crypto/secp256k1", + b"github.com/ethereum/go-ethereum/crypto/secp256k1", + ) + + if newContent != content: + with open(filename, "wb") as f: + f.write(newContent)