my-beets/play.sh

12 lines
237 B
Bash
Executable File

#! /bin/bash
PLAYDIR="${PLAYDIR:-/tmp/beets_play}"
mkdir -p "$PLAYDIR"
cp "$1" "$PLAYDIR/play"
for f in "$@"; do
cp "$f" "$PLAYDIR/$(basename "$f")"
done
caddy file-server --listen :9999 --browse --root "$PLAYDIR"
rm "$PLAYDIR"/*