Skip to main content

Firmware

Bash/zsh only​

Download the binaries for all versions for a specific firmware​

The binaries related to all versions of a specific firmware can be downloaded using a short bash snippet

while read -r line;
do
outputFile=$( echo "$line" | cut -d, -f2);
url=$( echo "$line" | cut -d, -f1);
c8y api --url "$url" -n --timeout "30m" > "${outputFile}";
done < <(
c8y firmware versions list \
--firmware linux-iot \
--select "c8y_Firmware.url,childAdditions.references.0.managedObject.name" \
--pageSize 100 \
-o csv
)

Download all of the binaries for all firmware and versions​

The above example can be extended to download the binaries of each version of each firmware.

while read -r line;
do
outputFile=$( echo "$line" | cut -d, -f2);
url=$( echo "$line" | cut -d, -f1);
c8y api --url "$url" -n --timeout "30m" > "${outputFile}";
done < <(
c8y firmware list -p 100 \
| c8y firmware versions list \
--filter "c8y_Firmware.url like https*" \
--select "c8y_Firmware.url,childAdditions.references.0.managedObject.name" \
--pageSize 100 \
-o csv
)