You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
685 B
30 lines
685 B
6 years ago
|
#!/bin/bash
|
||
|
|
||
4 years ago
|
DIRECTORY="$(dirname "$0")"
|
||
6 years ago
|
|
||
|
function setup_binary() {
|
||
3 years ago
|
TEMP_DIR="/tmp/fnm-$(date '+%s')"
|
||
|
mkdir "$TEMP_DIR"
|
||
4 years ago
|
cp ./target/release/fnm "$TEMP_DIR/fnm"
|
||
6 years ago
|
export PATH=$TEMP_DIR:$PATH
|
||
|
export FNM_DIR=$TEMP_DIR/.fnm
|
||
3 years ago
|
|
||
|
# First run of the binary might be slower due to anti-virus software
|
||
|
echo "Using $(which fnm)"
|
||
|
echo " with version $(fnm --version)"
|
||
6 years ago
|
}
|
||
|
|
||
|
setup_binary
|
||
|
|
||
|
RECORDING_PATH=$DIRECTORY/screen_recording
|
||
|
|
||
4 years ago
|
(rm -rf "$RECORDING_PATH" &> /dev/null || true)
|
||
6 years ago
|
|
||
4 years ago
|
asciinema rec -c "$DIRECTORY/recorded_screen_script.sh" "$RECORDING_PATH"
|
||
3 years ago
|
sed "s@$TEMP_DIR@~@g" "$RECORDING_PATH" | \
|
||
|
svg-term \
|
||
|
--window \
|
||
|
--out "docs/fnm.svg" \
|
||
|
--height=17 \
|
||
|
--width=70
|