File: checkflac

package info (click to toggle)
flactag 2.0.4-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 2,096 kB
  • ctags: 477
  • sloc: sh: 10,777; cpp: 3,283; makefile: 62; sed: 7
file content (30 lines) | stat: -rwxr-xr-x 619 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

CDROM=/dev/hdc

if [ $# = "1" ]
then
	FILENAME="$1"
	
	CDID=`discid $CDROM`
	FLACID=`flactag --discid $FILENAME | cut -d':' -f 2| cut -d' ' -f 2`

	if [ "$FLACID" != "$CDID" ]
	then
		echo "**********"
		echo "**********"
		echo "**********"
		echo "********** Disc ID of FLAC doesn't match Disc ID of CD  **********"
		echo "********** Please re-rip this CD and remove any invalid **********"
		echo "********** disc IDs from the MusicBrainz service        **********"
		echo "**********"
		echo "**********"
		echo "**********"
	else
		echo "IDs match, disk is OK"
	fi
else
	echo "Usage: $0 flacfile"
fi