Debian Codegraph @

checkflac

raw ◀ ▶
Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 #!/bin/sh
2 set -e
3
4 if [ -z "$CDROM" ];
5 then
6 CDROM=/dev/cdrom
7 fi
8
9 if [ $# = "1" ]
10 then
11 FILENAME="$1"
12
13 CDID=`discid $CDROM`
14 FLACID=`flactag --discid $FILENAME | cut -d':' -f 2| cut -d' ' -f 2`
15
16 if [ "$FLACID" != "$CDID" ]
17 then
18 echo "**********"
19 echo "**********"
20 echo "**********"
21 echo "********** Disc ID of FLAC doesn't match Disc ID of CD **********"
22 echo "********** Please re-rip this CD and remove any invalid **********"
23 echo "********** disc IDs from the MusicBrainz service **********"
24 echo "**********"
25 echo "**********"
26 echo "**********"
27 else
28 echo "IDs match, disk is OK"
29 fi
30 else
31 echo "Usage: $0 flacfile"
32 fi
33
34