cueprint: Re-indent

This commit is contained in:
Svend Sorensen
2013-11-23 21:36:59 -08:00
parent 2e050cf916
commit 6f035855c4

View File

@@ -61,7 +61,7 @@ vorbis()
# TRACKTOTAL is not in the Xiph recomendation, but is in common use # TRACKTOTAL is not in the Xiph recomendation, but is in common use
[ -n "$fields" ] || [ -n "$fields" ] ||
fields='TITLE VERSION ALBUM TRACKNUMBER TRACKTOTAL ARTIST PERFORMER COPYRIGHT LICENSE ORGANIZATION DESCRIPTION GENRE DATE LOCATION CONTACT ISRC' fields='TITLE VERSION ALBUM TRACKNUMBER TRACKTOTAL ARTIST PERFORMER COPYRIGHT LICENSE ORGANIZATION DESCRIPTION GENRE DATE LOCATION CONTACT ISRC'
# fields' corresponding cueprint conversion characters # fields' corresponding cueprint conversion characters
# seperate alternates with a space # seperate alternates with a space
@@ -84,30 +84,30 @@ vorbis()
ISRC='%i %u' ISRC='%i %u'
(for field in $fields; do (for field in $fields; do
case "$field" in case "$field" in
(*=*) echo "$field";; (*=*) echo "$field";;
(*) (*)
value="" value=""
for conv in $(eval echo \$$field); do for conv in $(eval echo \$$field); do
value=$($CUEPRINT -n $trackno -t "$conv\n" "$cue_file") value=$($CUEPRINT -n $trackno -t "$conv\n" "$cue_file")
if [ -n "$value" ]; then if [ -n "$value" ]; then
echo "$field=$value" echo "$field=$value"
break break
fi fi
done done
;; ;;
esac esac
done) | $VORBISTAG "$file" done) | $VORBISTAG "$file"
} }
id3() id3()
{ {
MP3TAG=$(which mid3v2) \ MP3TAG=$(which mid3v2) \
|| MP3TAG=$(which id3v2) || MP3TAG=$(which id3v2)
if [ -z "${MP3TAG}" ]; then if [ -z "${MP3TAG}" ]; then
echo "error: not found '(m)id3v2'." echo "error: not found '(m)id3v2'."
exit 1 exit 1
fi fi
# space seperated list of ID3 v1.1 tags # space seperated list of ID3 v1.1 tags
@@ -128,17 +128,17 @@ id3()
for field in $fields; do for field in $fields; do
case "$field" in case "$field" in
*=*) value="${field#*=}";; *=*) value="${field#*=}";;
*) *)
value="" value=""
for conv in $(eval echo \$$field); do for conv in $(eval echo \$$field); do
value=$($CUEPRINT -n $1 -t "$conv\n" "$cue_file") value=$($CUEPRINT -n $1 -t "$conv\n" "$cue_file")
if [ -n "$value" ]; then if [ -n "$value" ]; then
break break
fi fi
done done
;; ;;
esac esac
if [ -n "$value" ]; then if [ -n "$value" ]; then
@@ -185,8 +185,8 @@ main()
NUM_FILES=0 FIELDS= NUM_FILES=0 FIELDS=
for arg in "$@"; do for arg in "$@"; do
case "$arg" in case "$arg" in
*.*) NUM_FILES=$(expr $NUM_FILES + 1);; *.*) NUM_FILES=$(expr $NUM_FILES + 1);;
*) FIELDS="$FIELDS $arg";; *) FIELDS="$FIELDS $arg";;
esac esac
done done