Merge pull request #15 from svend/cuetag_spaces
cuetag: Fix handling of spaces in file names
This commit is contained in:
@@ -182,16 +182,15 @@ main()
|
|||||||
ntrack=$(cueprint -d '%N' "$cue_file")
|
ntrack=$(cueprint -d '%N' "$cue_file")
|
||||||
trackno=1
|
trackno=1
|
||||||
|
|
||||||
FILES= FIELDS=
|
NUM_FILES=0 FIELDS=
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
*.*) FILES="$FILES $arg";;
|
*.*) NUM_FILES=$(expr $NUM_FILES + 1);;
|
||||||
*) FIELDS="$FIELDS $arg";;
|
*) FIELDS="$FIELDS $arg";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
set -- $FILES
|
if [ $NUM_FILES -ne $ntrack ]; then
|
||||||
if [ $# -ne $ntrack ]; then
|
|
||||||
echo "warning: number of files does not match number of tracks"
|
echo "warning: number of files does not match number of tracks"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -209,7 +208,7 @@ main()
|
|||||||
*.[Tt][Xx][Tt])
|
*.[Tt][Xx][Tt])
|
||||||
vorbis $trackno "$file"
|
vorbis $trackno "$file"
|
||||||
;;
|
;;
|
||||||
*)
|
*.*)
|
||||||
echo "$file: uknown file type"
|
echo "$file: uknown file type"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user