jayrambhia / Install-OpenCV

shell scripts to install different version of OpenCV in different distributions of Linux
1.04k stars 946 forks source link

minor update #21

Open moreandres opened 10 years ago

moreandres commented 10 years ago

Hi, your script is really useful. What do you think of this quick update?

It is a typo, plus telling wget to avoid downloading the package if already there, and instead of 4 use only the available number of cores on the system.

diff --git a/Ubuntu/opencv_install.sh b/Ubuntu/opencv_install.sh index ca04719..c4dd155 100755 --- a/Ubuntu/opencv_install.sh +++ b/Ubuntu/opencv_install.sh @@ -20,10 +20,10 @@ mkdir $dldir cd $dldir echo "Removing any pre-installed ffmpeg and x264" sudo apt-get -qq remove ffmpeg x264 libx264-dev -echo "Installing Dependenices" +echo "Installing Dependencies" sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg- echo "Downloading OpenCV" $version -wget -O $downloadfile http://sourceforge.net/projects/opencvlibrary/files/open +wget -c -O $downloadfile http://sourceforge.net/projects/opencvlibrary/files/o echo "Installing OpenCV" $version echo $downloadfile | grep ".zip" if [ $? -eq 0 ]; then @@ -35,7 +35,7 @@ cd opencv-$version mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_T -make -j 4 +make -j cat /proc/cpuinfo | grep processor | wc -l sudo make install sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' sudo ldconfig diff --git a/get_latest_version_download_file.sh b/get_latest_versiondownload old mode 100644 new mode 100755