2019-03-18 09:34:05 +03:00
|
|
|
#!/bin/bash
|
2018-02-25 19:01:32 +03:00
|
|
|
# Runs wezterm using `script` to record a session with timing information
|
|
|
|
|
|
|
|
NOW=`date -u +%Y%m%d%H%M%S`
|
|
|
|
echo $NOW
|
2020-06-12 18:49:20 +03:00
|
|
|
PATH=$PWD/target/release:$PATH
|
2018-02-25 19:01:32 +03:00
|
|
|
|
2019-03-18 09:34:05 +03:00
|
|
|
case $OSTYPE in
|
|
|
|
darwin*)
|
2021-03-21 06:14:17 +03:00
|
|
|
wezterm start -- script -r $PWD/$NOW.typescript
|
2019-03-18 09:34:05 +03:00
|
|
|
tar -cz -f $NOW.tgz $NOW.typescript
|
|
|
|
;;
|
|
|
|
|
|
|
|
linux*)
|
2020-06-12 18:49:20 +03:00
|
|
|
wezterm start -- script -t$NOW.timing $NOW.typescript
|
2019-03-18 09:34:05 +03:00
|
|
|
tar -cz --remove-files -f $NOW.tgz $NOW.timing $NOW.typescript
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2018-02-25 19:01:32 +03:00
|
|
|
echo "Transcript recorded in $NOW.tgz"
|