From b7cf19023b69aecabf42bc0f8e040005b93113b9 Mon Sep 17 00:00:00 2001 From: Yann Autissier Date: Mon, 25 Jul 2022 19:27:19 +0200 Subject: [PATCH] fix install --- include.sh | 57 +++++++++++++++++++++++++----------------------------- install.sh | 4 +++- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/include.sh b/include.sh index 4740fe6..9b78b82 100644 --- a/include.sh +++ b/include.sh @@ -48,6 +48,11 @@ import_jaklis() { } import_kodi() { + [[ ! $(which kodi) && "$user" != "xbian" ]] &&\ + echo ">>> installation kodi + vstream = votre videotheque ! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" \ + && sudo apt-get install kodi -y \ + && ~/.zen/astrXbian/.install/kodi_uqload_downloader.sh + echo "=== IMPORT configuration ASTROPORT dans ~/.kodi" cp -Rf ~/.zen/astrXbian/.install/.kodi ~/ } @@ -56,34 +61,24 @@ install_requirements() { echo "mise à jour des dépots de votre distribution..." sudo apt-get update - [[ "$user" != "xbian" ]] &&\ - for i in x11-utils xclip zenity handbrake*; do\ - [ $(dpkg-query -w -f='${status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ] &&\ - echo ">>> installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<";\ - sudo apt install -y $i; - done - - for i in git fail2ban netcat-traditional inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv swig libgpgme-dev mpack libssl-dev libffi-dev; do - if [ $(dpkg-query -w -f='${status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then - echo ">>> installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" - sudo apt install -y $i - fi + PACKAGES="" + INSTALL_PACKAGES="" + [[ "$user" != "xbian" ]] && PACKAGES="x11-utils xclip zenity handbrake*" + PACKAGES="${PACKAGES} git fail2ban netcat-traditional inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv swig libgpgme-dev mpack libssl-dev libffi-dev" + PACKAGES="${PACKAGES} build-essential qrencode jq bc file gawk yt-dlp ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox nmap httrack html2text ssmtp imagemagick libcurl4-openssl-dev" + # python pip install dependencies + PACKAGES="${PACKAGES} libcairo2-dev libgirepository1.0-dev pkg-config" + # AstroGEEK OpenCV = 'Intelligence Amie' + PACKAGES="${PACKAGES} python3-opencv" + for package in ${PACKAGES}; do\ + [ $(dpkg-query -W -f='${status}' ${package} 2>/dev/null | grep -c "ok installed") -eq 0 ] \ + && apt-cache show ${package} > /dev/null 2>&1 \ + && INSTALL_PACKAGES="${INSTALL_PACKAGES} ${package}" done - for i in build-essential qrencode jq bc file gawk yt-dlp ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox nmap httrack html2text ssmtp imagemagick ttf-mscorefonts-installer libcurl4-openssl-dev; do - if [ $(dpkg-query -w -f='${status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then - echo ">>> installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" - sudo apt install -y $i - fi - done - - [[ ! $(which kodi) && "$user" != "xbian" ]] &&\ - echo ">>> installation kodi + vstream = votre videotheque ! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<";\ - sudo apt-get install kodi -y;\ - ${MY_PATH}/.install/kodi_uqload_downloader.sh - - echo "## INSTALLATION AstroGEEK OpenCV = 'Intelligence Amie' " - sudo apt-get install python3-opencv -y + [ -n "${INSTALL_PACKAGES# *}" ] \ + && echo ">>> installation ${INSTALL_PACKAGES} <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" \ + && sudo apt install -y ${INSTALL_PACKAGES} ## Correct PDF restrictions for imagemagick echo "# Correction des droits export PDF imagemagick" @@ -97,11 +92,11 @@ install_requirements() { echo "###########################" echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc && source ~/.bashrc; echo ">>> PATH=$PATH" python3 -m pip install -U pip - python3 -m pip install -U setuptools wheel - python3 -m pip install -U cryptography Ed25519 base58 google duniterpy pynacl pgpy gpg - python3 -m pip install -U nicotine-plus silkaj - python3 -m pip install -U protobuf==3.19.0 - + python3 -m pip install setuptools wheel + python3 -m pip install cryptography Ed25519 base58 google duniterpy pynacl pgpy gpg + python3 -m pip install pycairo + python3 -m pip install nicotine-plus silkaj + python3 -m pip install protobuf==3.19.0 if [[ "$USER" == "pi" ]]; then ## PROPOSE QR_CODE PRINTER SUR RPI echo "Ambassade? Souhaitez vous ajouter imprimante 'brother_ql'? Saisissez OUI, sinon laissez vide et tapez sur ENTRER" diff --git a/install.sh b/install.sh index d56ec8d..d1edee4 100755 --- a/install.sh +++ b/install.sh @@ -39,7 +39,7 @@ import_astrXbian import_ipfs # Copy astroport config in kodi -import_kodi +# import_kodi # Jaklis setup import_jaklis @@ -122,3 +122,5 @@ https://astroport.com # MAIN # fi } + +~/.zen/astrXbian/zen/tools/cron_VRFY.sh