Skip to content

Commit 7f57deb

Browse files
authored
Update OpenCV-4-7-0.sh
1 parent 1607149 commit 7f57deb

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

OpenCV-4-7-0.sh

+23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
set -e
3+
install_opencv () {
34
echo "Installing OpenCV 4.7.0 on your Raspberry Pi 64-bit OS"
45
echo "It will take minimal 2.5 hour !"
56
cd ~
@@ -75,3 +76,25 @@ sudo apt-get update
7576

7677
echo "Congratulations!"
7778
echo "You've successfully installed OpenCV 4.7.0 on your Raspberry Pi 64-bit OS"
79+
}
80+
81+
cd ~
82+
83+
if [ -d ~/opencv/build ]; then
84+
echo " "
85+
echo "You have a directory ~/opencv/build on your disk."
86+
echo "Continuing the installation will replace this folder."
87+
echo " "
88+
89+
printf "Do you wish to continue (Y/n)?"
90+
read answer
91+
92+
if [ "$answer" != "${answer#[Nn]}" ] ;then
93+
echo "Leaving without installing OpenCV"
94+
else
95+
install_opencv
96+
fi
97+
else
98+
install_opencv
99+
fi
100+

0 commit comments

Comments
 (0)