Adjust software $json_data to match recent changes #339
+1,887
−1,498
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The idea from the start was to have one data entry point, the "Header". The active data array can be viewed with
git repo
orapt installed
using the command:armbian-config --api generate_json_object
This PR is the first step towards producing a JSON object pipeline that will eventually replace the JSON file. By leveraging the already used
module_option
array andjq
for querying, we aim to ensure consistency and eliminate the need to manually edit or source a separate file.Many JSON keys are missing in the
module_option
array and cannot be parsed or queried. Leveragingjq
can:Changes Made
module_option
array for better parsing and querying.generate_json_data.sh
script to properly handle the new keys and generate a valid JSON object.config.runtime.sh
module_options to remove unhandled escape sequences and quotes.Goals and Impact
jq
optimization.Testing
./bin/armbian-config --api set_json_options
produces the correct JSON output.Notes
armbian-config --api generate_json_options
is out of date and needs updating.module_options
array was lacking needed keys, and this PR addresses multiple issues such as loading times and nesting issues that bash is not meant to handle.