1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-23 00:07:38 +00:00

Automate the installation asciinema screencast

This commit is contained in:
Andrey Bienkowski 2022-02-07 20:05:12 +03:00
parent 3c380f8a90
commit e3a0b5fde8
5 changed files with 1062 additions and 1354 deletions

View file

@ -0,0 +1,4 @@
FROM fedora:35
RUN dnf install -y wget
RUN dnf install -y expect
COPY ./install.tcl ./run-install.sh /asciinema/

View file

@ -0,0 +1,8 @@
Do NOT run the examples without isolation (e.g docker) or
this code may make undesirable changes to your host.
To this:
```sh
docker build --tag borg-examples .
asciinema rec -c 'docker run --rm borg-examples bash /asciinema/run-install.sh' --overwrite ./install.json
```

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,35 @@
# Configuration for send -h
# Tries to emulate a human typing
# Tweak this if typing is too fast or too slow
set send_human {.05 .1 1 .01 .2}
set script [string trim {
# This asciinema will show you the installation of borg as a standalone binary. Usually you only need this if you want to have an up-to-date version of borg or no package is available for your distro/OS.
# First, we need to download the version, we'd like to install
wget -q --show-progress https://github.com/borgbackup/borg/releases/download/1.1.0b6/borg-linux64
# and do not forget the GPG signature!
wget -q --show-progress https://github.com/borgbackup/borg/releases/download/1.1.0b6/borg-linux64.asc
# In this case, we have already imported the public key of a borg developer. So we only need to verify it:
gpg --verify borg-linux64.asc
# Okay, the binary is valid!
# Now install it:
sudo cp borg-linux64 /usr/local/bin/borg
sudo chown root:root /usr/local/bin/borg
# and make it executable
sudo chmod 755 /usr/local/bin/borg
# Now check it: (possibly needs a terminal restart)
borg -V
# That's it! Check out the other screencasts to see how to actually use borgbackup.
}]
foreach line [split $script \n] {
send_user "$ "
send_user -h $line\n
spawn -noecho /bin/sh -c $line
expect eof
}

View file

@ -0,0 +1,6 @@
{
gpg --recv-keys "6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393"
} &> /dev/null # Do not pollute the asciinema output.
# The above redirection can be removed for troubleshhting
expect /asciinema/install.tcl