linux_install_b.sh 630 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. # This file contains documentation snippets for Linux installation tutorial
  3. if [ "$1" = "--check" ] ; then
  4. sudo()
  5. {
  6. command $@
  7. }
  8. fi
  9. sudo apt update
  10. # [clang]
  11. sudo apt install -y clang
  12. # [clang]
  13. # [ninja]
  14. sudo apt install -y ninja-build
  15. # [ninja]
  16. # [cmake]
  17. sudo apt install -y cmake
  18. # [cmake]
  19. # [git]
  20. sudo apt install -y git
  21. # [git]
  22. # [download]
  23. git clone https://github.com/opencv/opencv.git
  24. git -C opencv checkout 4.x
  25. # [download]
  26. # [prepare]
  27. mkdir -p build && cd build
  28. # [prepare]
  29. # [configure]
  30. cmake -GNinja ../opencv
  31. # [configure]
  32. # [build]
  33. ninja
  34. # [build]
  35. # [install]
  36. sudo ninja install
  37. # [install]