X-Git-Url: https://git.hcoop.net/clinton/abcde.git/blobdiff_plain/bb87e4fd7116079f395135f74a7373cdc7c9a0ab..89d883d6f1c8091a77cad5f761e30230a3e87b45:/abcde diff --git a/abcde b/abcde index 08a01c6..8011749 100755 --- a/abcde +++ b/abcde @@ -13,7 +13,7 @@ # # $Id$ -VERSION="2.3.99-$Revision$" +VERSION='2.3.99-$Revision$' usage () { @@ -840,20 +840,22 @@ do_encode () if [ -s "$IN" -o X"$USEPIPES" = "Xy" ] ; then for OUTPUT in $(echo $OUTPUTTYPE | tr , \ ) do - if [ "$NOGAP" = "y" ] && checkstatus encodetrack-$OUTPUT-$1 ; then - continue - fi case "$OUTPUT" in vorbis|ogg) OUT="$ABCDETEMPDIR/track$1.$OGGOUTPUTCONTAINER" + OUTPUT=$OGGOUTPUTCONTAINER ;; flac) OUT="$ABCDETEMPDIR/track$1.$FLACOUTPUTCONTAINER" + OUTPUT=$FLACOUTPUTCONTAINER ;; *) OUT="$ABCDETEMPDIR/track$1.$OUTPUT" ;; esac + if [ "$NOGAP" = "y" ] && checkstatus encodetrack-$OUTPUT-$1 ; then + continue + fi if [ X"$USEPIPES" = "Xy" ]; then RUN_COMMAND="" # We need a way to store the creation of the files when using PIPES @@ -1351,6 +1353,7 @@ do_discid () disktool -m ${CDROM#/dev/} fi WEHAVEACD=y + DISCID=$(echo $TRACKINFO | cut -f1 -d' ') else TRACKINFO=$(cat "$WAVOUTPUTDIR/abcde.$DISCID/discid") fi @@ -2550,7 +2553,7 @@ while getopts 1a:bBc:C:d:Defghj:klLmMnNo:pPr:s:S:t:T:uvVxw:W:z opt ; do b) BATCHNORM=y ;; B) NOBATCHREPLAYGAIN=y ;; c) if [ -e "$OPTARG" ] ; then . "$OPTARG" ; else log error "config file \"$OPTARG\" cannot be found." ; exit 1 ; fi ;; - C) DISCID="${OPTARG#abcde.}" ;; + C) DISCID="$( echo ${OPTARG#abcde.} | tr -d /)" ;; d) CDROM="$OPTARG" ;; D) set -x ;; e) ERASEENCODEDSTATUS=y ;; @@ -3488,11 +3491,11 @@ fi if [ "$DOCLEAN" = "y" ] && [ ! "$FORCE" = "y" ]; then ENCODED_FORMATS=$(egrep "^encodetrack-(.{3,6})-(.{1,2})$" "$ABCDETEMPDIR/status" | cut -d"-" -f2 | sort -u | tr '\n' '|') MOVED_FORMATS=$(egrep "^movetrack-output-(.{3,6})$" "$ABCDETEMPDIR/status" | cut -d"-" -f3 | sort -u | tr '\n' '|') - decho [ENCODED_FORMATS] - decho [MOVED_FORMATS] if [ "$ENCODED_FORMATS" != "$MOVED_FORMATS" ]; then - log warning "Not all encoded formats have been requested to be moved." - log warning "Use \"-a clean -f -C $DISCID\" to force the removal of the remaining data." + log warning "The encoded formats does not match with the moved ones" + log warning "Formats encoded: $( echo $ENCODED_FORMATS | tr "|" " " )" + log warning "Formats moved: $( echo $MOVED_FORMATS | tr "|" " " )" + log warning "Use \"abcde -a clean -f -C $DISCID\" to force the removal of the remaining data." DOCLEAN=n fi fi