run.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. TARGETS=("demo1" "demo2" "demo3")
  3. demo3() {
  4. # http://plplot.org/docbook-manual/plplot-html-5.15.0/devices.html#specifying-devices
  5. PYTHONPATH=./src PLPLOT_DEV="tk" ./build/demo3
  6. }
  7. demo2() {
  8. PYTHONPATH=./src ./build/demo2
  9. }
  10. demo1() {
  11. python3 src/demo1_get-price.py
  12. }
  13. # determine target from argument
  14. if [[ " ${TARGETS[@]} " =~ " $1 " ]]; then
  15. "$1"
  16. else
  17. echo "Available targets: ${TARGETS[*]}"
  18. echo "Usage: $0 [target]"
  19. fi
  20. # Plotting Options:
  21. # -----------------
  22. # < 1> xwin X-Window (Xlib)
  23. # < 2> tk Tcl/TK Window
  24. # < 3> ps PostScript File (monochrome)
  25. # < 4> psc PostScript File (color)
  26. # < 5> xfig Fig file
  27. # < 6> null Null device
  28. # < 7> ntk New tk driver
  29. # < 8> tkwin New tk driver
  30. # < 9> mem User-supplied memory device
  31. # <10> svg Scalable Vector Graphics (SVG 1.1)
  32. # <11> pdf Portable Document Format PDF
  33. # <12> xcairo Cairo X Windows Driver
  34. # <13> pdfcairo Cairo PDF Driver
  35. # <14> pscairo Cairo PS Driver
  36. # <15> epscairo Cairo EPS Driver
  37. # <16> svgcairo Cairo SVG Driver
  38. # <17> pngcairo Cairo PNG Driver
  39. # <18> memcairo Cairo Memory Driver
  40. # <19> extcairo Cairo External Context Driver