mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
create rootf's & SDK from 2018.02.9 buildroot (#10)
--------- Co-authored-by: tiopex <tiopxyz@gmail.com> Co-authored-by: tiopex <67048640+tiopex@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import getdeveloperlib
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def parse_args():
|
||||
@@ -23,6 +24,11 @@ def parse_args():
|
||||
|
||||
|
||||
def __main__():
|
||||
# DEVELOPERS is one level up from here
|
||||
devs_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
|
||||
devs = getdeveloperlib.parse_developers(devs_dir)
|
||||
if devs is None:
|
||||
sys.exit(1)
|
||||
args = parse_args()
|
||||
|
||||
# Check that only one action is given
|
||||
@@ -44,13 +50,9 @@ def __main__():
|
||||
print("No action specified")
|
||||
return
|
||||
|
||||
devs = getdeveloperlib.parse_developers()
|
||||
if devs is None:
|
||||
sys.exit(1)
|
||||
|
||||
# Handle the check action
|
||||
if args.check:
|
||||
files = getdeveloperlib.check_developers(devs)
|
||||
files = getdeveloperlib.check_developers(devs, devs_dir)
|
||||
for f in files:
|
||||
print(f)
|
||||
|
||||
@@ -70,9 +72,11 @@ def __main__():
|
||||
|
||||
# Handle the files action
|
||||
if args.files is not None:
|
||||
args.files = [os.path.abspath(f) for f in args.files]
|
||||
for dev in devs:
|
||||
for f in args.files:
|
||||
if dev.hasfile(f):
|
||||
for devfile in dev.files:
|
||||
commonfiles = [f for f in args.files if f.startswith(devfile)]
|
||||
if commonfiles:
|
||||
print(dev.name)
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user