Recently Written · git

sad

sad (2f30.org simple audio daemon) with a Cygwin/OSS port on branch cygwin

git clone https://github.com/equwal/sad

Log | Files | Refs


cygwin/sacc (444 bytes)

1 #!/bin/sh
2 # sacc: send one sad command, e.g. "sacc add FILE", "sacc status playback".
3 # Windows paths in "add" are converted with cygpath.
4 PATH=/usr/local/bin:/usr/bin:$PATH
5 sock=${SAD_SOCK:-/tmp/sad-sock}
6 [ $# -eq 0 ] && { echo "usage: sacc command [args]" >&2; exit 1; }
7 if [ "$1" = add ] && [ $# -ge 2 ]; then
8 	shift
9 	for p in "$@"; do printf 'add %s\n' "$(cygpath -ua "$p")"; done
10 else
11 	printf '%s\n' "$*"
12 fi | socat - UNIX-CONNECT:"$sock"