feat(): Add recording for once oosh
This commit is contained in:
parent
4ba52c5f10
commit
8aae0240b7
20
scripts/once_install_rec.sh
Executable file
20
scripts/once_install_rec.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check if in $PWD/scripts directory
|
||||
if [ "$(basename $PWD)" != "scripts" ]; then
|
||||
echo "You are not in the ./scripts directory. Change directory and run script again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Variables
|
||||
INPUT_FILE=once_install_script.sh
|
||||
OUTPUT_FILE=../casts/once_install.cast
|
||||
TIMEOUT=300
|
||||
|
||||
# Check if $OUTPUT_FILE exists
|
||||
if [ -f $OUTPUT_FILE ]; then
|
||||
echo "File $OUTPUT_FILE already exists. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
poetry run asciinema-automation --debug -dt 75 -sd 30 -t $TIMEOUT --asciinema-arguments " -i $TIMEOUT --cols=238 --rows=56 " $INPUT_FILE $OUTPUT_FILE
|
24
scripts/once_install_script.sh
Normal file
24
scripts/once_install_script.sh
Normal file
|
@ -0,0 +1,24 @@
|
|||
#$ delay 50
|
||||
#$ expect \$
|
||||
|
||||
#$ sendcharacter # enter docker container where to install oosh
|
||||
#$ sendcontrol m
|
||||
#$ expect \$
|
||||
#$ wait 500
|
||||
|
||||
docker exec -it once bash
|
||||
# default ubuntu prompt expands to # for root and $ for all other users
|
||||
#$ expect \#
|
||||
|
||||
cd /opt
|
||||
#$ expect \#
|
||||
./oosh
|
||||
# default oosh prompt expands to > followed by a whitespace
|
||||
#$ expect \> $
|
||||
|
||||
# exit oosh shell
|
||||
exit
|
||||
#$ expect \#
|
||||
|
||||
# exit docker container session to gracefully exit asciinema recording
|
||||
exit
|
Loading…
Reference in New Issue
Block a user