updated to syncthing v1.20.1 (amd64)

archiveurl is now a regex
This commit is contained in:
Djan GICQUEL 2022-05-13 22:06:19 +02:00
parent 724503d381
commit 35bec1405f
2 changed files with 9 additions and 19 deletions

View File

@ -6,8 +6,8 @@
# Variables partagées
# releases url : https://github.com/syncthing/syncthing/releases/
archive_url="https://github.com/syncthing/syncthing/releases/download/v1.19.0/syncthing-dragonfly-amd64-v1.19.0.tar.gz"
archivename="syncthing-linux-amd64-v1.19.0.tar.gz"
archive_url="https://github.com/syncthing/syncthing/releases/download/v1.20.1/syncthing-linux-amd64-v1.20.1.tar.gz"
archivename=$(echo $archive_url | grep -oE 'syncthing-(.*)\.tar\.gz')
iconurl="https://raw.githubusercontent.com/syncthing/syncthing/main/assets/logo-128.png"
#Chemin sans slash de fin. Un dossier "syncthing" sera créé dans ce dossier

View File

@ -6,8 +6,8 @@
# Variables partagées
# releases url : https://github.com/syncthing/syncthing/releases/
archive_url="https://github.com/syncthing/syncthing/releases/download/v1.19.0/syncthing-dragonfly-amd64-v1.19.0.tar.gz"
archivename="syncthing-linux-amd64-v1.19.0.tar.gz"
archive_url="https://github.com/syncthing/syncthing/releases/download/v1.20.1/syncthing-linux-amd64-v1.20.1.tar.gz"
archivename=$(echo $archive_url | grep -oE 'syncthing-(.*)\.tar\.gz')
iconurl="https://raw.githubusercontent.com/syncthing/syncthing/main/assets/logo-128.png"
# Fonctions partagées
@ -17,16 +17,6 @@ if [ "$?" != "0" ]; then
echo "Erreur la connexion internet semble défaillante"
echo "Fin du script."
exit
else
echo "La connexion internet est fonctionnelle"
echo ""
fi
}
fonct_CreationDossier () {
if [ ! -d "$1" ]; then
mkdir -p "$1"
echo "Le dossier $1 a été créé."
fi
}
@ -104,13 +94,13 @@ echo ""
fonct_TouchePourContinuer
clear
fonct_CreationDossier $HOME/bin/
fonct_CreationDossier $HOME/.icons/
fonct_CreationDossier $HOME/.config/autostart/
mkdir -p $HOME/bin/ || echo "Error, mkdir bin failed"exit
mkdir -p $HOME/.icons/ || echo "Error, mkdir icons failed";exit
mkdir -p $HOME/.config/autostart/ || echo "Error, mkdir autostart failed";exit
# Téléchargement syncthing
wget --quiet $archive_url
tar -xzf $archivename -C $HOME/bin/
wget --quiet $archive_url || echo "Error, downloading archive";exit
tar -xzf $archivename -C $HOME/bin/ || echo "Error, untar archive failed";exit
mv $HOME/bin/syncthing* $HOME/bin/syncthing
rm $archivename
echo ""