From 7ee419c0fb560f6ff1fc4c1b728454ff071be7a0 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 29 Apr 2012 17:12:15 +0200 Subject: [PATCH] Do not hardcode the track numbers. --- stuff/cdripper.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stuff/cdripper.sh b/stuff/cdripper.sh index f9a76e72..0f5a00a4 100755 --- a/stuff/cdripper.sh +++ b/stuff/cdripper.sh @@ -9,10 +9,10 @@ cd music # rip all tracks beginning with second one (the first track is data) cdparanoia -B "2-" -# could certainly be more elegant.. -for i in "02" "03" "04" "05" "06" "07" "08" "09" "10" "11" -do - oggenc -q 6 -o $i.ogg track$i.cdda.wav +for I in track*.cdda.wav; do + NUM="${I#track}" + NUM="${NUM%.cdda.wav}" + oggenc -q 6 -o "$NUM.ogg" "$I" done # remove .wav files