diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/hiddenapi/merge_csv.py | 7 | ||||
| -rwxr-xr-x | scripts/rbc-run | 16 |
2 files changed, 20 insertions, 3 deletions
diff --git a/scripts/hiddenapi/merge_csv.py b/scripts/hiddenapi/merge_csv.py index b047aab71..a65326c51 100755 --- a/scripts/hiddenapi/merge_csv.py +++ b/scripts/hiddenapi/merge_csv.py @@ -55,14 +55,15 @@ else: if entry.endswith('.uau'): csv_readers.append(dict_reader(io.TextIOWrapper(zip.open(entry, 'r')))) -headers = set() if args.header: fieldnames = args.header.split(',') else: + headers = {} # Build union of all columns from source files: for reader in csv_readers: - headers = headers.union(reader.fieldnames) - fieldnames = sorted(headers) + for fieldname in reader.fieldnames: + headers[fieldname] = "" + fieldnames = list(headers.keys()) # By default chain the csv readers together so that the resulting output is # the concatenation of the rows from each of them: diff --git a/scripts/rbc-run b/scripts/rbc-run new file mode 100755 index 000000000..e2fa6d1be --- /dev/null +++ b/scripts/rbc-run @@ -0,0 +1,16 @@ +#! /bin/bash +# Convert and run one configuration +# Args: <product>-<variant> +[[ $# -eq 1 && "$1" =~ ^(.*)-(.*)$ ]] || { echo Usage: ${0##*/} PRODUCT-VARIANT >&2; exit 1; } +declare -r product="${BASH_REMATCH[1]:-aosp_arm}" +declare -r variant="${BASH_REMATCH[2]:-eng}" +set -eu +declare -r output_root=${OUT_DIR:-out} +declare -r runner="$output_root/soong/.bootstrap/bin/rbcrun" +declare -r converter="$output_root/soong/.bootstrap/bin/mk2rbc" +declare -r launcher=$output_root/launchers/run.rbc +$converter -mode=write -r --outdir $output_root --launcher=$launcher $product +printf "#TARGET_PRODUCT=$product TARGET_BUILD_VARIANT=$variant\n" +env TARGET_PRODUCT=$product TARGET_BUILD_VARIANT=$variant \ + $runner RBC_OUT="make,global" RBC_DEBUG="${RBC_DEBUG:-}" $launcher + |