UNPKG

record-desktop

Version:

Record gifs and take screenshots on linux, built with electron.

18 lines (12 loc) 457 B
import { execSync, spawnAsync } from '../utils'; import path from 'path'; export default function mkfifo() { const file = `/tmp/fifo-${Math.random()}`; execSync(`rm -f ${file} && mkfifo ${file}`); // @TODO why const proc = spawnAsync(`sh`, [path.resolve(__dirname, '..', '..', '..', '..', 'cat.sh'), file]); const onEnd = () => proc.kill(); proc.stdout.pipe(process.stdout); proc.stderr.pipe(process.stderr); return { onEnd, file }; };