From 7aa0f81e1155ce8c291694339abcc7472a58077d 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 | 65 +++++++++++++++++++++++++++++++------------------------------- install.sh | 6 ++++-- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/include.sh b/include.sh index 4740fe6..e711d04 100644 --- a/include.sh +++ b/include.sh @@ -22,8 +22,12 @@ import_astrXbian() { mkdir -p ~/.zen cd ~/.zen # TODO INSTALL FROM IPFS / IPNS - git clone https://git.p2p.legal/axiom-team/astrXbian.git - git clone https://git.p2p.legal/qo-op/Astroport.ONE.git + [ ! -d astrXbian ] \ + && git clone https://git.p2p.legal/axiom-team/astrXbian.git \ + || GIT_DIR=astrXbian/.git git pull + [ ! -d Astroport.ONE ] \ + && git clone https://git.p2p.legal/qo-op/Astroport.ONE.git \ + || GIT_DIR=Astroport.ONE git pull } import_astroport() { @@ -48,6 +52,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 +65,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 +96,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..20a7622 100755 --- a/install.sh +++ b/install.sh @@ -36,10 +36,10 @@ install_requirements import_astrXbian # Init ipfs -import_ipfs +# 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/cron_VRFY.sh