From 942d9144778936e19a2aad4ccb0b267de856d24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20K=C3=B6hl?= Date: Mon, 27 Nov 2023 07:46:33 +0100 Subject: [PATCH] docs: mention `--stream` option --- www/docs/guide/over-the-air-updates.md | 13 +++++++++++++ www/src/theme/prism-lang-shell.js | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/www/docs/guide/over-the-air-updates.md b/www/docs/guide/over-the-air-updates.md index db380c0..db05486 100644 --- a/www/docs/guide/over-the-air-updates.md +++ b/www/docs/guide/over-the-air-updates.md @@ -65,6 +65,19 @@ Note that a persistent overlay that may exist for the spare partition is deleted To avoid the overlay from being discarded, use the `--keep-overlay` option when installing the update. Please be aware that this may lead to incompatibilities between the overlay and the freshly installed system. +Rugpi also has experimental support for streaming updates directly to the SD card instead of first storing the image and then installing it. +To this end, use the option `--stream`. +With `--stream`, you can use `-` as artifact path to install an image streamed via stdin to Rugpi Ctrl. +This also allows using compressed images. +For instance, to download, decompress, and install an image on-the-fly, use: + +```shell +curl | xz -d | rugpi-ctrl update install --stream - +``` + +Streaming an image is faster because the data only has to be written to the SD card once. +Furthermore, it has the advantage that the image does not take up precious space on the data partition during the installation. + [^2]: How this happens is outside the scope of Rugpi's core functionality. ### Committing an Update diff --git a/www/src/theme/prism-lang-shell.js b/www/src/theme/prism-lang-shell.js index 67204c9..e3e204f 100644 --- a/www/src/theme/prism-lang-shell.js +++ b/www/src/theme/prism-lang-shell.js @@ -1,6 +1,6 @@ Prism.languages.shell = { function: { - pattern: /(docker|rugpi-ctrl|\.\/run-bakery|\bgit\b|\bdocker\b)/ + pattern: /(\sxz\s|\bcurl\b|docker|rugpi-ctrl|\.\/run-bakery|\bgit\b|\bdocker\b)/ }, constant: { pattern: /(true|false)/,