Merge pull request #18195 from mshabunin:linux-tutorial
[platform/upstream/opencv.git] / samples / install / linux_quick_install.sh
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
10 # [body]
11 # Install minimal prerequisites (Ubuntu 18.04 as reference)
12 sudo apt update && sudo apt install -y cmake g++ wget unzip
13
14 # Download and unpack sources
15 wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip
16 unzip opencv.zip
17
18 # Create build directory
19 mkdir -p build && cd build
20
21 # Configure
22 cmake  ../opencv-master
23
24 # Build
25 cmake --build .
26 # [body]