From 5eed1c9cfeb139c2cb5c3ceb6442bd2b9d3b3e54 Mon Sep 17 00:00:00 2001 From: Elliott Baron Date: Sun, 20 Sep 2009 23:09:05 -0400 Subject: Fixed cover art option, execute python scripts relative to main script. * flac2alac.sh: Corrected bug with -c option, use dirname to find path to python scripts. --- flac2alac.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/flac2alac.sh b/flac2alac.sh index 4b6a8b2..ec28172 100755 --- a/flac2alac.sh +++ b/flac2alac.sh @@ -32,6 +32,8 @@ if [ $# -eq 0 ]; then usage fi +basedir=`dirname $0` + for i in "$@" do # Convert from FLAC to ALAC @@ -43,18 +45,17 @@ do exit $rc fi # Migrate tags - alac_copy_tags.py "$flac" "$alac" + $basedir/alac_copy_tags.py "$flac" "$alac" rc=$? if [ $rc -ne 0 ]; then exit $rc fi -done - -# Embed Album Art -if [ -z "$cover" ]; then - alac_embed_art.py "$cover" "$@" - rc=$? - if [ $rc -ne 0 ]; then - exit $rc + # Embed Album Art + if [ ! -z "$cover" ]; then + $basedir/alac_embed_art.py "$cover" "$alac" + rc=$? + if [ $rc -ne 0 ]; then + exit $rc + fi fi -fi +done -- cgit