mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
add rename script
This commit is contained in:
parent
bc0be1b106
commit
a219e590de
1 changed files with 27 additions and 0 deletions
27
rename.py
Normal file
27
rename.py
Normal file
|
|
@ -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)
|
||||||
Loading…
Reference in a new issue