Skip to content

Commit 25267f3

Browse files
committed
Improvements of the script
1 parent 21f800e commit 25267f3

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

INSTALL.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Installing required packages for OpenCV via apt-get
22
echo "INSTALLING REQUIRED PACKAGES"
33
echo "----------------------------"
4-
sudo apt-get --yes install build-essential cmake git libgtk2.0-dev 'pkg-config' libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev
4+
sudo apt-get --yes install build-essential cmake git libgtk2.0-dev 'pkg-config' libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev gcc-multilib g++-multilib
55

66
if [[ $? > 0 ]]; then
77
echo "It seems that you are having problems with apt-get"
@@ -27,15 +27,12 @@ if [ ! -e opencv.zip ]; then
2727
echo "-----------------------"
2828
wget --tries=2 --output-document=opencv.zip -q "https://codeload.github.com/opencv/opencv/zip/3.3.0"
2929
else
30-
rm -rf *
31-
echo "Downloading source code"
32-
echo "-----------------------"
33-
wget --tries=2 --output-document=opencv.zip -q "https://codeload.github.com/opencv/opencv/zip/3.3.0"
30+
find . ! -name 'opencv.zip' -exec rm -rf {} + 2> /dev/null
3431
fi
3532

33+
# Extracting opencv.zip quietly
3634
echo "EXTRACTING ZIP"
3735
echo "--------------"
38-
# Extracting opencv.zip
3936
unzip -q opencv.zip
4037

4138
# Erasing useless directory and zip file
@@ -67,8 +64,10 @@ echo "LIBRARIES HAVE BEEN INSTALLED"
6764

6865
# When the libraries have been installed, we have to tell to
6966
# ldconfig(It configures the dynamic linker run-time bindings)
70-
# that we have shared libraries in /usr/local/lib (where the
67+
# that we have shared libraries in /usr/local/lib (where the
7168
# libraries have been installed
69+
echo "RUNNING LDCONFIG"
70+
echo "----------------"
7271
sudo echo "/usr/local/lib/" > opencv.conf
7372
sudo ldconfig
7473

0 commit comments

Comments
 (0)