From 5c59bfba45d665912752a1ef197d4b24f8ecc4c2 Mon Sep 17 00:00:00 2001 From: nlef <52351624+nlef@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:51:24 +0300 Subject: [PATCH] Update install.sh add opencv install option --- scripts/install.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 4ee2ec9..a0eed08 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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