Roland0 wrote:
>
> Use this test:
> >
Code:
--------------------
> >
> [ `stat --printf="%Y" $FILE1` -eq `stat --printf="%Y" $FILE2` ]
>
--------------------
> >
Thanks Roland
I've been able to get back to this this morning. The conversion of all
my FLACs to OGGs completed some days ago in my absence.
This works perfectly for updating the timetags on the files:
Code:
--------------------
touch -r "$infile" "$outfile"
--------------------
But the '--printf' option for the 'stat' command doesn't seem to be
recognised in busybox, so I've used the '-c"%Y"' option instead. I
couldn't get the comparison of two 'stat' outputs to work in the 'if'
statement as per your example, so I've just put the timetags into
separate variables. Seems to work:
Code:
--------------------
intime=$(stat -c"%Y" "$infile")
outtime=$(stat -c"%Y" "$outfile")
if [ ! -f "$outfile" ] || [ "$intime" -ne "$outtime" ]; then
--------------------
I can probably do without the '! -f "outfile"' check because outtime
will be empty if outfile doesn't exist - I'll do some further checking.
I'm quite close now - just need to put the CUE file updating into the
script, and then I'll have a script that can be run on the entire
library to update any files that have changed.
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=110496
_______________________________________________
ripping mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/ripping