Add force requirements options, autodetect libsodium version

This commit is contained in:
poka 2019-12-06 19:54:13 +00:00
parent 7750613dd5
commit 03c37f00f1
2 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,8 @@ sudo apt update
sudo apt install curl jq -y
# Silkaj + Duniterpy
sudo apt install python3-pip libsodium18 -y
libsodium=$(sudo apt search libsodium | grep -v "header" | grep "Network communication" -B1 | head -n1 | awk -F '/' '{ print $1 }')
sudo apt install python3-pip $libsodium -y
pip3 install silkaj
# Install IPFS

View File

@ -9,6 +9,7 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
init_loc="$MY_PATH/shell/init.sh"
now=$(date +%Y-%m-%d)
repOption=$1
#force_req="o"
## Update G1sms+ code
git pull
@ -24,7 +25,7 @@ $MY_PATH/.install/export_colors.sh
[[ -f ~/.bash_aliases ]] && source ~/.bash_aliases
## Vérifie si IPFS est installé
if [[ -z $(which ipfs) || -z $(which gammu) ]];then
if [[ $force_req == "o" || -z $(which ipfs) || -z $(which gammu) ]];then
echo -e "${c_yellow}IPFS ou gammu n'ont pas été détectés sur votre machine, nous allons installer tous les prérequis...$c_"
$MY_PATH/.install/install_requirements.sh
$MY_PATH/.install/configure_ipfs_layer.sh