]> git.rm.cloudns.org Git - xonotic/xonotic-music.pk3dir.git/commitdiff
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 f83e936ddb8eeef123036c2a0b53da129899210a..c7ffe7471d5adc3347dc5a6280143e9e02920dd0 100644 (file)
@@ -3,4 +3,3 @@ _cdtrack 2 ninesix
 _cdtrack 3 northern-lights
 _cdtrack 4 sixtyfour_
 _cdtrack 5 stairs
-_cdtrack 6 thunder
index 9009fdaeeef66b795347362c1a6630edcd2377e4..f503e695196d8d16f4a6415026b5de77faa5e270 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