[Abcde-users] Custom Command Output to Output DIR/Folder

Roger rogerx.oss at gmail.com
Wed May 15 21:51:32 BST 2013


The likely reason why $OUTPUTFILEDIR looses it's definition, $OUTPUTFILEDIR is 
defined within several recursive loops within do_move, including below a $TMP 
variable definition.

As such, just after function do_move is called, the following definitions will 
be seen:

OUTPUTDIR: /home/roger/Music
OUTPUTFILE:
OUTPUTFILEDIR:

($OUTPUTFILEDIR should contain something like 
/home/roger/Music/Composer/AlbumName)

I have no idea as to why all this is performed within a heavily looped 
function.  I can only speculate, the author had several variable authored audio 
CD's and wanted to move each artist's works into separate folders?

The definition of $OUTPUTFILEDIR is lost immediately following do_move.  Users 
can only logically output to a statically named folder location!  Also, the 
OUTPUTFILEDIR is embedded within a loop within do_move.

I can only think, grab the variable contents into another variable name while 
the $OUTPUTFILEDIR is not null.

I'm about to give up and just hard code something for my own usage:

Line #1421

# Run post_move only once, while taking advantage of $OUTPUTFILEDIR variables.
if [ $RAN_POST_MOVE -eq 0 ] || [ -z $RAN_POST_MOVE ]; then
echo "At line 1434:"
echo "OUTPUTDIR: "$OUTPUTDIR
echo "OUTPUTFILE: "$OUTPUTFILE
echo "OUTPUTFILEDIR= "$OUTPUTFILEDIR
cdrdao read-toc --fast-toc $OUTPUTFILEDIR/cd.toc
RAN_POST_MOVE=1


Shrugs.  Likely only possible to create user function within .abcde.conf capable of taking advantage of $OUTPUTFILEDIR variable, is if do_move is completely rewritten?  Half of do_move, I likely cannot test or implement. :-/

-- 
Roger
http://rogerx.freeshell.org/



More information about the Abcde-users mailing list