1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-22 04:41:34 +03:00

update record/play scripts for macos

This commit is contained in:
Wez Furlong 2019-03-17 23:34:05 -07:00
parent 6cbb3ba432
commit 27c4de367e
2 changed files with 22 additions and 5 deletions

View File

@ -1,9 +1,19 @@
#!/bin/sh
#!/bin/bash
# Runs wezterm using `script` to record a session with timing information
NOW=`date -u +%Y%m%d%H%M%S`
echo $NOW
./target/release/wezterm -- script -t$NOW.timing $NOW.typescript
tar -cz --remove-files -f $NOW.tgz $NOW.timing $NOW.typescript
case $OSTYPE in
darwin*)
./target/release/wezterm start -- script -r $NOW.typescript
tar -cz -f $NOW.tgz $NOW.typescript
;;
linux*)
./target/release/wezterm start -- script -t$NOW.timing $NOW.typescript
tar -cz --remove-files -f $NOW.tgz $NOW.timing $NOW.typescript
;;
esac
echo "Transcript recorded in $NOW.tgz"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Replays a recorded session
TRANSCRIPT="$1"
@ -11,6 +11,13 @@ WHERE=`mktemp -d`
tar xzf "$TRANSCRIPT" -C $WHERE
echo "--- Starting replay ---"
scriptreplay $WHERE/*.timing $WHERE/*.typescript
case $OSTYPE in
darwin*)
script -p $WHERE/*.typescript
;;
linux*)
scriptreplay $WHERE/*.timing $WHERE/*.typescript
;;
esac
echo "--- replay complete ---"