updated to syncthing v1.20.1 (amd64)
archiveurl is now a regex
This commit is contained in:
parent
724503d381
commit
35bec1405f
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
# Variables partagées
|
# Variables partagées
|
||||||
# releases url : https://github.com/syncthing/syncthing/releases/
|
# 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"
|
archive_url="https://github.com/syncthing/syncthing/releases/download/v1.20.1/syncthing-linux-amd64-v1.20.1.tar.gz"
|
||||||
archivename="syncthing-linux-amd64-v1.19.0.tar.gz"
|
archivename=$(echo $archive_url | grep -oE 'syncthing-(.*)\.tar\.gz')
|
||||||
iconurl="https://raw.githubusercontent.com/syncthing/syncthing/main/assets/logo-128.png"
|
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
|
#Chemin sans slash de fin. Un dossier "syncthing" sera créé dans ce dossier
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
# Variables partagées
|
# Variables partagées
|
||||||
# releases url : https://github.com/syncthing/syncthing/releases/
|
# 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"
|
archive_url="https://github.com/syncthing/syncthing/releases/download/v1.20.1/syncthing-linux-amd64-v1.20.1.tar.gz"
|
||||||
archivename="syncthing-linux-amd64-v1.19.0.tar.gz"
|
archivename=$(echo $archive_url | grep -oE 'syncthing-(.*)\.tar\.gz')
|
||||||
iconurl="https://raw.githubusercontent.com/syncthing/syncthing/main/assets/logo-128.png"
|
iconurl="https://raw.githubusercontent.com/syncthing/syncthing/main/assets/logo-128.png"
|
||||||
|
|
||||||
# Fonctions partagées
|
# Fonctions partagées
|
||||||
@ -17,16 +17,6 @@ if [ "$?" != "0" ]; then
|
|||||||
echo "Erreur la connexion internet semble défaillante"
|
echo "Erreur la connexion internet semble défaillante"
|
||||||
echo "Fin du script."
|
echo "Fin du script."
|
||||||
exit
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,13 +94,13 @@ echo ""
|
|||||||
|
|
||||||
fonct_TouchePourContinuer
|
fonct_TouchePourContinuer
|
||||||
clear
|
clear
|
||||||
fonct_CreationDossier $HOME/bin/
|
mkdir -p $HOME/bin/ || echo "Error, mkdir bin failed"exit
|
||||||
fonct_CreationDossier $HOME/.icons/
|
mkdir -p $HOME/.icons/ || echo "Error, mkdir icons failed";exit
|
||||||
fonct_CreationDossier $HOME/.config/autostart/
|
mkdir -p $HOME/.config/autostart/ || echo "Error, mkdir autostart failed";exit
|
||||||
|
|
||||||
# Téléchargement syncthing
|
# Téléchargement syncthing
|
||||||
wget --quiet $archive_url
|
wget --quiet $archive_url || echo "Error, downloading archive";exit
|
||||||
tar -xzf $archivename -C $HOME/bin/
|
tar -xzf $archivename -C $HOME/bin/ || echo "Error, untar archive failed";exit
|
||||||
mv $HOME/bin/syncthing* $HOME/bin/syncthing
|
mv $HOME/bin/syncthing* $HOME/bin/syncthing
|
||||||
rm $archivename
|
rm $archivename
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
Reference in New Issue
Block a user