#!/bin/sh apt update apt install -y cmake g++ wget unzip git ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev cd ./src if [ -d "./opencv" ] then cd ./opencv git pull origin cd .. else git clone https://github.com/opencv/opencv.git fi cd .. mkdir -p ./.build-opencv cd ./.build-opencv cmake ../src/opencv make -j4 make install