From: Rudolf Polzer Date: Sat, 8 May 2010 16:27:59 +0000 (+0200) Subject: cdtracks management scripts fixed X-Git-Tag: xonotic-v0.1.0preview~14 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4a2943394e5dc38bff212772ce53df7c8513424a;p=xonotic%2Fxonotic-music.pk3dir.git cdtracks management scripts fixed --- diff --git a/cdtracks.cfg b/cdtracks.cfg index f83e936..c7ffe74 100644 --- a/cdtracks.cfg +++ b/cdtracks.cfg @@ -3,4 +3,3 @@ _cdtrack 2 ninesix _cdtrack 3 northern-lights _cdtrack 4 sixtyfour_ _cdtrack 5 stairs -_cdtrack 6 thunder diff --git a/cdtracks.sh b/cdtracks.sh index 9009fda..f503e69 100755 --- a/cdtracks.sh +++ b/cdtracks.sh @@ -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