Signed-off-by: Martin Jansa <[email protected]>
---
scripts/contrib/convert-overrides.py | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/scripts/contrib/convert-overrides.py
b/scripts/contrib/convert-overrides.py
index 739fd53bdb..bfdf785719 100755
--- a/scripts/contrib/convert-overrides.py
+++ b/scripts/contrib/convert-overrides.py
@@ -23,12 +23,10 @@ import tempfile
import shutil
import mimetypes
-if len(sys.argv) != 2:
+if len(sys.argv) < 2:
print("Please specify a directory to run the conversion script against.")
sys.exit(1)
-targetdir = sys.argv[1]
-
# List of strings to treat as overrides
vars = ["append", "prepend", "remove"]
vars = vars + ["qemuarm", "qemux86", "qemumips", "qemuppc", "qemuriscv",
"qemuall"]
@@ -125,15 +123,17 @@ def processfile(fn):
ourname = os.path.basename(sys.argv[0])
ourversion = "0.9.1"
-for root, dirs, files in os.walk(targetdir):
- for name in files:
- if name == ourname:
- continue
- fn = os.path.join(root, name)
- if os.path.islink(fn):
- continue
- if "/.git/" in fn or fn.endswith(".html") or fn.endswith(".patch") or
fn.endswith(".m4") or fn.endswith(".diff"):
- continue
- processfile(fn)
+for targetdir in sys.argv[1:]:
+ print("processing directory '%s'" % targetdir)
+ for root, dirs, files in os.walk(targetdir):
+ for name in files:
+ if name == ourname:
+ continue
+ fn = os.path.join(root, name)
+ if os.path.islink(fn):
+ continue
+ if "/.git/" in fn or fn.endswith(".html") or fn.endswith(".patch")
or fn.endswith(".m4") or fn.endswith(".diff"):
+ continue
+ processfile(fn)
print("All files processed with version %s" % ourversion)
--
2.30.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#154268):
https://lists.openembedded.org/g/openembedded-core/message/154268
Mute This Topic: https://lists.openembedded.org/mt/84547388/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-