From 1ea541a0c4d455b7314556d4eccaf72b7ffaaf06 Mon Sep 17 00:00:00 2001 From: Jonathan Zacsh Date: Sat, 10 Nov 2012 20:35:15 -0500 Subject: [PATCH] wah! finally Googled a bit to find `-playlist` as an excellent solution to the problem of play an album of my music. --- share/mplaydir | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 share/mplaydir diff --git a/share/mplaydir b/share/mplaydir new file mode 100755 index 0000000..48a6678 --- /dev/null +++ b/share/mplaydir @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +_n="$(basename "$0")" +[[ -r "$1" && -d "$1" ]] || { + printf 'Error: "%s" is not a readable directory\n' "$1" >&2 + printf 'USAGE: %s MUSIC_DIR\n' "$_n" >&2 + exit 1 +} +mplayer -playlist <(find "$1" -type f | sort)