esac
if [ X"$USEPIPES" = "Xy" ]; then
RUN_COMMAND=""
+ # We need a way to store the creation of the files when using PIPES
+ RUN_COMMAND_PIPES="run_command encodetrack-$OUTPUT-$1 true"
else
run_command '' echo "Encoding track $1 of $TRACKS: $TRACKNAME..."
RUN_COMMAND="run_command encodetrack-$OUTPUT-$1"
;;
wav)
# In case of wav output we need nothing. Just keep the wavs.
- run_command encodetrack-$OUTPUT-$1 true
;;
esac
+ $RUN_COMMAND_PIPES
done
# Only remove .wav if the encoding succeeded
if checkerrors "encodetrack-(.{3,6})-$1"; then :; else
decho ()
{
if [ x"$DEBUG" != "x" ]; then
- DEBUGECHO=$(echo "$@" | tr -d '[]')
- echo "[DEBUG] $DEBUGECHO: `eval echo \\$${DEBUGECHO}`"
+ if echo $1 | grep -q "^\[" ; then
+ DEBUGECHO=$(echo "$@" | tr -d '[]')
+ echo "[DEBUG] $DEBUGECHO: `eval echo \\$${DEBUGECHO}`"
+ else
+ echo "[DEBUG] $1"
+ fi
fi
}
MKTOCOPTS=""
VORBISCOMMENTOPTS="-R"
METAFLACOPTS="--no-utf8-convert"
+DIFFOPTS=
# Default to one process if -j isn't specified
MAXPROCS=1
esac
fi
+###USEPIPESSUPPORT###
+
# Rippers with USEPIPE support
# FIXME # Include here all the rippers we can figure out support pipes
PIPERIPPER_cdparanoia="-"
+PIPERIPPER_debug="-"
PIPERIPPER_flac="-c "
# Encoders with USEPIPE support
mpc)
PIPEENCODERSVARCHECK="PIPE_$MPPENCODER" ;;
esac
- if [ "$( eval echo "\$$PIPERIPPERSVARCHECK" )" = "$" ] ; then
+ decho "PIPERIPPERSVARCHECK: $( eval echo "\$$PIPERIPPERSVARCHECK" )"
+ if [ "$( eval echo "\$$PIPERIPPERSVARCHECK" )" = "$" ] || \
+ [ "$( eval echo "\$$PIPERIPPERSVARCHECK" )" = "" ] ; then
log error "no support for pipes with given ripper"
log error "read the USEPIPES file from the source tarball to get help."
log error "On a Debian system, it is under /usr/share/doc/abcde/USEPIPES.gz"
exit 1;
fi
- if [ "$( eval echo "\$$PIPEENCODERSVARCHECK" )" = "$" ] ; then
+ decho "PIPEENCODERSVARCHECK: $( eval echo "\$$PIPEENCODERSVARCHECK" )"
+ if [ "$( eval echo "\$$PIPEENCODERSVARCHECK" )" = "$" ] || \
+ [ "$( eval echo "\$$PIPEENCODERSVARCHECK" )" = "" ] ; then
log error "no support for pipes with given encoder"
log error "read the USEPIPES file from the source tarball to help"
log error "on a Debian system, read /usr/share/doc/abcde/USEPIPES.gz"
if [ "$DOREPLAYGAIN" = "y" ]; then
do_replaygain
fi
+
+# FIXME #
+# Check if all the encoded formats have been actually moved to the final destination
+# ...
+
# Check to see if run_command logged any errors
if [ -f "$ABCDETEMPDIR/errors" ]; then
log error "The following commands failed to run:"