1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/duniter_ynh.git synced 2024-09-03 18:26:35 +02:00

[enh] #25: release name convention have changed:

- Grep 'server' as there is now a 'server' and 'desktop' versions.
- Retrieve 'server' releases which doesn't contain NodeWebkit:
 - This reduce by two the size of the package: download & space usage.
- Grep 'linux' in the case there is only a 'windows' package released:
- that way windows package is not retrieved but an old version for linux.
- Request only one time GitHub. grep previous variable.
- Use variable for debian package path name.
This commit is contained in:
Moul 2016-10-11 19:30:05 +02:00
parent 9123468d4f
commit 07056ab512

View file

@ -2,13 +2,14 @@
INSTALL_DUNITER_DEBIAN_PACKAGE () {
# Retrieve url of last version and version number
url=$(curl -s https://api.github.com/repos/duniter/duniter/releases | grep "browser_" | grep $arch | head -1 | cut -d\" -f4)
version=$(curl -s https://api.github.com/repos/duniter/duniter/releases | grep "browser_" | grep $arch | head -1 | cut -d/ -f8)
url=$(curl -s https://api.github.com/repos/duniter/duniter/releases | grep "browser_" | grep $arch | grep "linux" | grep "server" | head -1 | cut -d\" -f4)
version=$(echo $url | cut -d/ -f8)
# Retrieve debian package and install it
wget -nc --quiet $url -P /tmp
sudo dpkg -i /tmp/duniter-$version-linux-$arch.deb
sudo rm -f /tmp/duniter-$version-linux-$arch.deb
deb="/tmp/duniter-server-$version-linux-$arch.deb"
sudo dpkg -i $deb
sudo rm -f $deb
}
CONFIG_SSOWAT_FOR_RESTRICTED_ACCESS () {