From 50897ae465383890fcf096642cbe279b761afde4 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Wed, 18 Nov 2020 12:39:57 -0800 Subject: [PATCH] Allow playing multiple files --- play.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/play.sh b/play.sh index 565965c..24bab26 100755 --- a/play.sh +++ b/play.sh @@ -1,9 +1,11 @@ #! /bin/bash -PLAYDIR=/tmp/beets_play +PLAYDIR="${PLAYDIR:-/tmp/beets_play}" mkdir -p "$PLAYDIR" -cp "$1" "$PLAYDIR/$(basename "$1")" cp "$1" "$PLAYDIR/play" +for f in "$@"; do + cp "$f" "$PLAYDIR/$(basename "$f")" +done caddy file-server --listen :9999 --browse --root "$PLAYDIR" rm "$PLAYDIR"/*