cdtracks management scripts fixed
authorRudolf Polzer <divverent@alientrap.org>
Sat, 8 May 2010 16:27:59 +0000 (18:27 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 8 May 2010 16:27:59 +0000 (18:27 +0200)
cdtracks.cfg
cdtracks.sh

index f83e936..c7ffe74 100644 (file)
@@ -3,4 +3,3 @@ _cdtrack 2 ninesix
 _cdtrack 3 northern-lights
 _cdtrack 4 sixtyfour_
 _cdtrack 5 stairs
-_cdtrack 6 thunder
index 9009fda..f503e69 100755 (executable)
@@ -1,12 +1,19 @@
 #!/bin/sh
 
+IGNORE=thunder
+
 set -ex
 cd sound/cdtracks
 for F in *.ogg; do
        T=${F%.ogg} # for tracker files we still need the ext
-       if ! grep "^cdtrack [1-9][0-9]* $T" ../../cdtracks.cfg >/dev/null; then
-               n=`tail -n 1 ../../cdtracks.cfg | cut -d ' ' -f 2`
-               n=$(($n+1))
-               echo "_cdtrack $n $T" >> ../../cdtracks.cfg
-       fi
+       case " $IGNORE " in
+               *" $T "*)
+                       ;;
+               *)
+                       if ! grep "^_cdtrack [1-9][0-9]* $T" ../../cdtracks.cfg >/dev/null; then
+                               n=`tail -n 1 ../../cdtracks.cfg | cut -d ' ' -f 2`
+                               n=$(($n+1))
+                               echo "_cdtrack $n $T" >> ../../cdtracks.cfg
+                       fi
+       esac
 done