You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4KB

  1. #!/bin/bash
  2. set -e
  3. if [ -d bin ]; then
  4. cd bin
  5. else
  6. echo "Please run this script from the distrho root folder"
  7. exit
  8. fi
  9. if [ ! -f cabbage/CabbagePluginSynthLv2.lv2/CabbagePluginSynthLv2.so ]; then exit 0; fi
  10. if [ ! -f cabbage/CabbagePluginMidiLv2.lv2/CabbagePluginMidiLv2.so ]; then exit 0; fi
  11. if [ ! -f cabbage/CabbagePluginEffectLv2.lv2/CabbagePluginEffectLv2.so ]; then exit 0; fi
  12. mkdir -p lv2
  13. if [ -f ../libs/lv2_ttl_generator.exe ]; then
  14. GEN=../../../libs/lv2_ttl_generator.exe
  15. EXT=dll
  16. else
  17. GEN=../../../libs/lv2_ttl_generator
  18. EXT=so
  19. fi
  20. FILES=`find ./cabbage -name \*.csd`
  21. for i in $FILES; do
  22. basename=`echo $i | awk 'sub("./cabbage/","")' | awk 'sub("/","\n")' | tail -n 1 | awk 'sub(".csd","")'`
  23. basename=`echo "cabbage-$basename"`
  24. lv2dir=`echo "./lv2/"$basename".lv2/"`
  25. mkdir -p -v $lv2dir
  26. if ( echo $i | grep "./cabbage/Synths/" > /dev/null ); then
  27. cp -v `pwd`/cabbage/CabbagePluginSynthLv2.lv2/CabbagePluginSynthLv2.so $lv2dir/$basename.$EXT
  28. elif ( echo $i | grep "./cabbage/MIDI/" > /dev/null ); then
  29. cp -v `pwd`/cabbage/CabbagePluginMidiLv2.lv2/CabbagePluginMidiLv2.so $lv2dir/$basename.$EXT
  30. else
  31. cp -v `pwd`/cabbage/CabbagePluginEffectLv2.lv2/CabbagePluginEffectLv2.so $lv2dir/$basename.$EXT
  32. fi
  33. cp -v $i $lv2dir/$basename.csd
  34. done
  35. # Special files
  36. cp -v cabbage/Synths/bassline.snaps lv2/cabbage-bassline.lv2/
  37. cd ..