mirror of https://github.com/borgbackup/borg.git
Begin automating asciinema screencasts
This commit is contained in:
parent
98fcef57ce
commit
910852acbf
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
sudo rm -r /media/backup/borgdemo || true
|
||||
sudo mkdir -p /media/backup/borgdemo
|
||||
sudo chown "$(whoami):$(whoami)" /media/backup/borgdemo
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env expect
|
||||
|
||||
if {[file isdirectory /media/backup/borgdemo] == 0} {
|
||||
send_user "Please, run basic-prepare.sh first\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 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}
|
||||
|
||||
# The screencast uses relative paths "Wallpaper"
|
||||
# We should not mess with the contents of whatever cwd happened to be
|
||||
cd [exec mktemp -d]
|
||||
mkdir Wallpaper
|
||||
|
||||
if {0} {
|
||||
spawn borg init --encryption=repokey /media/backup/borgdemo
|
||||
expect "Enter new passphrase: "
|
||||
send -h "correct horse battery staple\n"
|
||||
expect "Enter same passphrase again: "
|
||||
send -h "correct horse battery staple\n"
|
||||
expect -ex {Do you want your passphrase to be displayed for verification? [yN]: }
|
||||
send \n
|
||||
expect eof
|
||||
}
|
Loading…
Reference in New Issue