linux_quick_install.sh 515 B

1234567891011121314151617181920212223242526
  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. # [body]
  10. # Install minimal prerequisites (Ubuntu 18.04 as reference)
  11. sudo apt update && sudo apt install -y cmake g++ wget unzip
  12. # Download and unpack sources
  13. wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip
  14. unzip opencv.zip
  15. # Create build directory
  16. mkdir -p build && cd build
  17. # Configure
  18. cmake ../opencv-4.x
  19. # Build
  20. cmake --build .
  21. # [body]