From 0dbe2c49be0c5848d5cf30eb82b20bbc2b748598 Mon Sep 17 00:00:00 2001 From: Yossi Date: Thu, 13 Apr 2017 21:56:53 +0300 Subject: [PATCH] move opencv install to the bottom --- stage2/01-sys-tweaks/01-run.sh | 49 ++++++++++++++++------------------ 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/stage2/01-sys-tweaks/01-run.sh b/stage2/01-sys-tweaks/01-run.sh index 897d851..b3f4039 100755 --- a/stage2/01-sys-tweaks/01-run.sh +++ b/stage2/01-sys-tweaks/01-run.sh @@ -138,33 +138,7 @@ echo "start_x=1" >> /boot/config.txt -echo "========== Downloading and installing OpenCV ============" -cd / -# git clone https://github.com/Itseez/opencv.git --depth 1 -wget -c -O "opencv-3.1.0.zip" "https://github.com/Itseez/opencv/archive/3.1.0.zip" -sudo apt-get install unzip -unzip -q -n "opencv-3.1.0.zip" -cd opencv-3.1.0 -echo "==>>>====== Building OpenCV ============" -cd /home/opencv-3.1.0 -mkdir build -cd build -cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_EXAMPLES=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=/usr/local .. -echo "==>>>====== This might take a long time.. ============" -make -j1 - -sudo make install -sudo ldconfig - -# remove the installation file -cd / -sudo rm opencv-3.1.0.zip - -# TODO: Add a test if openCV was installed correctly - - - echo "========== Setup sound to I2S ============" sudo curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash @@ -267,7 +241,30 @@ sudo npm i +echo "========== Downloading and installing OpenCV ============" +cd / +# git clone https://github.com/Itseez/opencv.git --depth 1 +wget -c -O "opencv-3.1.0.zip" "https://github.com/Itseez/opencv/archive/3.1.0.zip" +sudo apt-get install unzip +unzip -q -n "opencv-3.1.0.zip" +cd opencv-3.1.0 +echo "==>>>====== Building OpenCV ============" +cd /home/opencv-3.1.0 +mkdir build +cd build +cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_EXAMPLES=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=/usr/local .. +echo "==>>>====== This might take a long time.. ============" +make -j1 + +sudo make install +sudo ldconfig + +# remove the installation file +cd / +sudo rm opencv-3.1.0.zip + +# TODO: Add a test if openCV was installed correctly