#!/bin/bash
# generates a list of opcodes form the command "csound -z"
# to be used with the csound vim tools:
# http://www.eumus.edu.uy/docentes/jure/csound/vim/
# luis jure lj@eumus.edu.uy

OUTFILE="csound_opcodes.vim"
TMPFILE="csound.tmp"

csound -z >$TMPFILE 2>&1
CSOUNDVERSION=`cat $TMPFILE | grep Csound`
OPCODES=`cat $TMPFILE | grep opcodes` 
echo "\" $CSOUNDVERSION" > $OUTFILE
echo "\" $OPCODES" >> $OUTFILE
cat $TMPFILE |
sed -e '1,/^$/d' |
sed -e 's/[ \t]\+/\n/g' |
sort |
uniq |
sed -e '/0dbfs\|instr\|endin\|opcode\|endop/d' |
tr "\n" " " |
sed -e 's/^/syn keyword CsOpcode /' >> $OUTFILE && rm $TMPFILE

# última actualización: 2010-06-11 17:32:36

