ctpv/helpers.sh

14 lines
240 B
Bash
Raw Normal View History

2022-05-25 23:57:50 +02:00
get_fifo() {
printf '/tmp/ctpvfifo.%s' "$1"
}
2022-05-22 09:55:04 +02:00
exists() {
command -v "$1" > /dev/null
}
2022-05-25 23:57:50 +02:00
fifo_open() {
# https://unix.stackexchange.com/a/522940/183147
dd oflag=nonblock conv=notrunc,nocreat count=0 of="$1" \
>/dev/null 2>/dev/null
}