From 55ea973eac7fb2f601e1e251f38d7b7209f441ed Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Fri, 15 Jan 2021 08:39:11 -0600 Subject: [PATCH] Allow multiple file arguments --- songattr | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/songattr b/songattr index e30eebf..5cdc5cb 100755 --- a/songattr +++ b/songattr @@ -164,8 +164,16 @@ done shift $(($OPTIND - 1)) -if test -z "$@"; then help; fi +if test -z "$1"; then help; fi if test ! -e /bin/ffmpeg; then help; fi -if test "$SONG" -eq 1; then set_song_attrs "$@"; fi -if test "$ALBUM" -eq 1; then set_album_attrs "$@"; fi +if test "$SONG" -eq 1; then + for song in $@; do + set_song_attrs "$song" + done +fi +if test "$ALBUM" -eq 1; then + for song in $@; do + set_album_attrs "$@" + done +fi