gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

fstversion.sh (537B)


      1 #!/bin/sh
      2 
      3 fst_h="$1"
      4 
      5 if [ "x${fst_h}" = "x" ]; then
      6  fst_h=fst/fst.h
      7 fi
      8 
      9 extract_values() {
     10  egrep "FST_(HOST|EFFECT|TYPE|CONST|FLAG|SPEAKER)"  "$1" \
     11 	 | egrep -v "# *define " \
     12 	 | grep -v "FST_fst_h"
     13 }
     14 
     15 version=$( \
     16 extract_values "${fst_h}" \
     17 | grep -v UNKNOWN \
     18 | grep -c . \
     19 )
     20 unknown=$( \
     21 extract_values "${fst_h}" \
     22 | egrep "FST_.*_UNKNOWN" \
     23 | grep -c . \
     24 )
     25 
     26 
     27 sed -e "s|\(# *define  *FST_MINOR_VERSION  *\)[0-9]*$|\1${version}|" -i "${fst_h}"
     28 echo "version: ${version}"
     29 echo "identifiers: known:${version} unknown:${unknown}"