Skip to content

Instantly share code, notes, and snippets.

@alban
Created December 7, 2018 17:51
Show Gist options
  • Save alban/a776e03dffbb2cf0abec22bb4fe98318 to your computer and use it in GitHub Desktop.
Save alban/a776e03dffbb2cf0abec22bb4fe98318 to your computer and use it in GitHub Desktop.
asciinema2gif.sh
asciinema2gif ()
{
SRC=$1;
DST=$2;
SRC_DIR=$(realpath $(dirname $SRC));
SRC_FILE=$(basename $SRC);
DST_DIR=$(realpath $(dirname $DST));
DST_FILE=$(basename $DST);
sudo docker run --rm -v ${SRC_DIR}:/data -v ${DST_DIR}:/out asciinema/asciicast2gif /data/${SRC_FILE} /out/$DST_FILE;
sudo chown $UID:$UID ${DST}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment