29 lines
1.4 KiB
Python
29 lines
1.4 KiB
Python
|
#!/usr/bin/env python3
|
|||
|
|
|||
|
# ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
|
|||
|
# SPDX-License-Identifier: GPL-2.0
|
|||
|
# Copyright (c) 2023 Ricardo Pardini <ricardo@pardini.net>
|
|||
|
# This file is a part of the Armbian Build Framework https://github.com/armbian/build/
|
|||
|
# ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
|
|||
|
import json
|
|||
|
import logging
|
|||
|
import os
|
|||
|
|
|||
|
import sys
|
|||
|
|
|||
|
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|||
|
|
|||
|
from common import armbian_utils
|
|||
|
|
|||
|
# Prepare logging
|
|||
|
armbian_utils.setup_logging()
|
|||
|
log: logging.Logger = logging.getLogger("info-gatherer-image")
|
|||
|
|
|||
|
# read the targets.json file passed as first argument as a json object
|
|||
|
with open(sys.argv[1]) as f:
|
|||
|
targets = json.load(f)
|
|||
|
|
|||
|
every_info = armbian_utils.gather_json_output_from_armbian("config-dump-json", targets)
|
|||
|
|
|||
|
print(json.dumps(every_info, indent=4, sort_keys=True))
|