borg/docs/misc/asciinema/entrypoint.sh
Thomas Waldmann 21c7c34bdf
new borg2 demo screencast, recorded in a container, fixes #6303
The screencast is still typed by expect, but it now runs in a container
(podman or docker) instead of a vagrant VM, see #8040.

record.sh builds borg from the git tag given by BORG_VERSION, generates
the demo data and records docs/misc/asciinema/borg2-demo.cast.

The demo itself was rewritten for borg 2: repo-create, an archive series
addressed by archive IDs, mount, delete/undelete, prune, compact, check.
The demo data is generated (notes, logs, a database dump) instead of
downloading wallpaper jpegs, so that compression is actually visible.

Removes the borg 1.2 screencast scripts and recordings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 15:21:21 +02:00

19 lines
732 B
Bash
Executable file

#!/bin/sh
# Record the borg2 demo screencast. Runs inside the container, see README.rst.
set -eu
CAST=borg2-demo.cast # this is also the name record.exp gives to asciinema
# Always start from the same state, so that re-recording is reproducible.
rm -rf /media/backup/borgdemo /home/user/Documents /home/user/restore \
/home/user/.config/borg /home/user/.cache/borg
mkdir -p /media/backup/borgdemo
cp -a /opt/demo-data /home/user/Documents
chown -R user:user /home/user /media/backup
su - user -c "expect -f /demo/record.exp"
# The recording runs as user "user", which usually can not write to the bind
# mounted output directory, so copy the result over as root.
cp "/tmp/$CAST" "/out/$CAST"
echo "recorded: /out/$CAST"