# Copyright for this work is to expire January 1, 2010, after which it
# shall be public domain.
-VERSION="2.3.99-$Id$"
+VERSION="2.3.99-$Id $"
usage ()
{
*);;
esac
done
- if checkerrors replaygain-.{3,6}; then
- run_command replaygain false
- else
+ if checkerrors replaygain-.{3,6}; then :; else
run_command replaygain true
fi
fi
;;
esac
done
- if checkerrors "tagtrack-(.{3,6})-$1"; then
- run_command tagtrack-$1 false
- else
+ if checkerrors "tagtrack-(.{3,6})-$1"; then :; else
run_command tagtrack-$1 true
fi
else
for UTRACKNUM in $TRACKQUEUE
do
- echo encodetrack-$UTRACKNUM >> status
+ run_command encodetrack-$UTRACKNUM true
done
fi
)
esac
done
# Only remove .wav if the encoding succeeded
- if checkerrors "encodetrack-(.{3,6})-$1"; then
- run_command encodetrack-$1 false
- else
+ if checkerrors "encodetrack-(.{3,6})-$1"; then :; else
run_command encodetrack-$1 true
if [ ! "$KEEPWAVS" = "y" ] ; then
rm -f "$IN"
{
for OUTPUT in $(echo $OUTPUTTYPE | tr , \ )
do
+ case $OUTPUT in
+ vorbis|ogg)
+ OUTPUT=$OGGOUTPUTCONTAINER
+ ;;
+ flac)
+ OUTPUT=$FLACOUTPUTCONTAINER
+ ;;
+ esac
# Create a playlist file for the playlist data to go into.
# We used to wipe it out if it existed. Now we request permision if interactive.
for LASTTRACK in $TRACKQUEUE; do :; done
if [ ! "$RET" = "0" ];then
echo "Warning: Something went wrong while querying the CD... Maybe a DATA CD?"
fi
- TRACKS="$( echo "$CDPARANOIAOUTPUT" | egrep '^[[:space:]]+[[:digit:]]' | tail -n 1 | get_first | tr -d "." | tr '\n' ' ' )"
+ TRACKS="$(echo "$CDPARANOIAOUTPUT" | egrep '^[[:space:]]+[[:digit:]]' | tail -n 1 | get_first | tr -d "." | tr '\n' ' ')"
CDPARANOIAAUDIOTRACKS="$TRACKS"
else
- if [ -f "$ABCDETEMPDIR/status" ] && checkstatus cdparanoia-audio-tracks ; then
- TRACKS=$( cat "$ABCDETEMPDIR/cdparanoia-audio-tracks" )
- else
+ if [ -f "$ABCDETEMPDIR/status" ] && TRACKS=$(checkstatus cdparanoia-audio-tracks); then :; else
TRACKS=$(echo $TRACKINFO | cut -f2 -d' ')
fi
fi
fi
# If we got the CDPARANOIA status and it is not recorded, save it now
if [ -n "$CDPARANOIAAUDIOTRACKS" ]; then
- if checkstatus cdparanoia-audio-tracks; then :; else
- if echo "$CDPARANOIAAUDIOTRACKS" >> "$ABCDETEMPDIR/cdparanoia-audio-tracks"; then
- echo "cdparanoia-audio-tracks" >> "$ABCDETEMPDIR/status"
- fi
+ if checkstatus cdparanoia-audio-tracks > /dev/null 2>&1; then :; else
+ echo cdparanoia-audio-tracks=$CDPARANOIAAUDIOTRACKS >> "$ABCDETEMPDIR/status"
fi
fi