Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
add opencv install option
  • Loading branch information
nlef authored Oct 3, 2024
1 parent 6f3c370 commit 5c59bfb
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,27 @@ stop_sevice() {
}

install_packages() {
PKGLIST="python3-virtualenv python3-dev python3-cryptography python3-gevent python3-numpy python3-opencv ffmpeg x264 libx264-dev libwebp-dev"
PKGLIST=""

report_status "Running apt-get update..."
sudo apt-get update --allow-releaseinfo-change
INSTALL_OPENCV=""
while [[ ! (INSTALL_OPENCV =~ ^(?i)(y|n|no|yes)(?-i)$) ]]; do
read -p "Install python-opencv package? (Y/n): " -e -i "y" INSTALL_OPENCV
case "${INSTALL_OPENCV}" in
Y|y|Yes|yes)
echo -e "###### > Yes"
PKGLIST="python3-virtualenv python3-dev python3-cryptography python3-gevent python3-numpy python3-opencv ffmpeg x264 libx264-dev libjpeg*-turbo libwebp-dev"
break;;
N|n|No|no)
echo -e "###### > No"
PKGLIST="python3-virtualenv python3-dev python3-cryptography python3-gevent python3-numpy ffmpeg x264 libx264-dev libjpeg*-turbo libwebp-dev"
break;;
*)
warn_msg "Invalid command!";;
esac
done

for pkg in $PKGLIST; do
echo "${cyan}$pkg${default}"
done
Expand Down

0 comments on commit 5c59bfb

Please sign in to comment.